diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-30 00:07:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-30 00:07:45 +0300 |
commit | 8308674afc1f8636bcd2017e1573292d1500af9d (patch) | |
tree | b77fe5dd1a1fe7f6193d010a6deffc21593196f7 /spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb | |
parent | 7fe1490a589010205896293ec225dfcc88676a9e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb b/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb index afa495fc9a4..553e9f10b0d 100644 --- a/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb +++ b/spec/support/shared_examples/initializers/uses_gitlab_url_blocker_shared_examples.rb @@ -152,4 +152,11 @@ RSpec.shared_examples 'a request using Gitlab::UrlBlocker' do expect(request_stub).to have_been_requested end end + + context 'when a non HTTP/HTTPS URL is provided' do + it 'raises an error' do + expect { make_request('ssh://example.com') } + .to raise_error(ArgumentError) + end + end end |