summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-10-22 11:57:55 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-10-22 11:57:55 +0200
commite26a30e5cef35b3ba7c920b941498c2ed16c54ee (patch)
tree989ab9cd0f772a9baeadc8ad3e0f05cbb4cfd311 /spec
parent380f63bf8d9b7f568c3958f6d0caeb0c05e712ac (diff)
downloadgitlab-ce-e26a30e5cef35b3ba7c920b941498c2ed16c54ee.tar.gz
Improve error message when `include` is blocked
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/ci/config/external/file/remote_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config/external/file/remote_spec.rb b/spec/lib/gitlab/ci/config/external/file/remote_spec.rb
index f65a5a1c727..7c1a1c38736 100644
--- a/spec/lib/gitlab/ci/config/external/file/remote_spec.rb
+++ b/spec/lib/gitlab/ci/config/external/file/remote_spec.rb
@@ -144,5 +144,14 @@ describe Gitlab::Ci::Config::External::File::Remote do
expect(subject).to match /could not be fetched because of HTTP code `404` error!/
end
end
+
+ context 'when the URL is blocked' do
+ let(:location) { 'http://127.0.0.1/some/path/to/config.yaml' }
+
+ it 'should include details about blocked URL' do
+ expect(subject).to eq "Remote file could not be fetched because URL '#{location}' " \
+ 'is blocked: Requests to localhost are not allowed!'
+ end
+ end
end
end