diff options
Diffstat (limited to 'spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb b/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb index b275d594792..9d1a55b5f73 100644 --- a/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb +++ b/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.shared_examples 'issue tracker service URL attribute' do |url_attr| +RSpec.shared_examples 'issue tracker integration URL attribute' do |url_attr| it { is_expected.to allow_value('https://example.com').for(url_attr) } it { is_expected.not_to allow_value('example.com').for(url_attr) } @@ -8,6 +8,12 @@ RSpec.shared_examples 'issue tracker service URL attribute' do |url_attr| it { is_expected.not_to allow_value('herp-and-derp').for(url_attr) } end +# TODO: clean up: +# remove when https://gitlab.com/gitlab-org/gitlab/-/issues/330300 has been completed +RSpec.shared_examples 'issue tracker service URL attribute' do |url_attr| + it_behaves_like 'issue tracker integration URL attribute', url_attr +end + RSpec.shared_examples 'allows project key on reference pattern' do |url_attr| it 'allows underscores in the project name' do expect(described_class.reference_pattern.match('EXT_EXT-1234')[0]).to eq 'EXT_EXT-1234' |