diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 22:01:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 22:01:26 +0300 |
commit | 1ff28a8d8d370efef8bbac2da1edb85b758d4643 (patch) | |
tree | 906de1dd9c7637330f2eaea9c1a4217decd9a749 /spec/models/integrations/campfire_spec.rb | |
parent | a876afc5fd85a4ccae6947941884f3913f472ab0 (diff) |
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
Diffstat (limited to 'spec/models/integrations/campfire_spec.rb')
-rw-r--r-- | spec/models/integrations/campfire_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/integrations/campfire_spec.rb b/spec/models/integrations/campfire_spec.rb index 405a9ff4b3f..48e24299bbd 100644 --- a/spec/models/integrations/campfire_spec.rb +++ b/spec/models/integrations/campfire_spec.rb @@ -5,7 +5,17 @@ require 'spec_helper' RSpec.describe Integrations::Campfire do include StubRequests + it_behaves_like Integrations::ResetSecretFields do + let(:integration) { described_class.new } + end + describe 'Validations' do + it { is_expected.to validate_numericality_of(:room).is_greater_than(0).only_integer } + it { is_expected.to validate_length_of(:subdomain).is_at_most(63) } + it { is_expected.to allow_value("foo").for(:subdomain) } + it { is_expected.not_to allow_value("foo.bar").for(:subdomain) } + it { is_expected.not_to allow_value("foo.bar/#").for(:subdomain) } + context 'when integration is active' do before do subject.active = true |