gitlab-org--gitlab-foss/spec/support/issue_tracker_service_shared_example.rb
Rémy Coutable ef340f6e77 Ensure URL in all Service subclasses are valid
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-25 15:28:24 -04:00

7 lines
367 B
Ruby

RSpec.shared_examples 'issue tracker service 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) }
it { is_expected.not_to allow_value('ftp://example.com').for(url_attr) }
it { is_expected.not_to allow_value('herp-and-derp').for(url_attr) }
end