summaryrefslogtreecommitdiff
path: root/spec/support/issue_tracker_service_shared_example.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/issue_tracker_service_shared_example.rb')
-rw-r--r--spec/support/issue_tracker_service_shared_example.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/issue_tracker_service_shared_example.rb b/spec/support/issue_tracker_service_shared_example.rb
new file mode 100644
index 00000000000..b6d7436c360
--- /dev/null
+++ b/spec/support/issue_tracker_service_shared_example.rb
@@ -0,0 +1,7 @@
+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