summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-04-02 17:13:23 +0200
committerDouwe Maan <douwe@selenight.nl>2018-04-02 17:20:18 +0200
commitb95918dda8c6cd5328d028492d36c3ee07e35943 (patch)
tree6756d41e609eb46a29b037742a4c34bf3d943504 /spec/models
parent7143bb88522db4784be6b593083061a104d4b630 (diff)
downloadgitlab-ce-b95918dda8c6cd5328d028492d36c3ee07e35943.tar.gz
Make error messages even more descriptive
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 96adf64bcec..fef868ac0f2 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -224,14 +224,14 @@ describe Project do
project2 = build(:project, import_url: 'http://localhost:9000/t.git')
expect(project2).to be_invalid
- expect(project2.errors[:import_url]).to include('imports are not allowed from that URL')
+ expect(project2.errors[:import_url].first).to include('Requests to localhost are not allowed')
end
it "does not allow blocked import_url port" do
project2 = build(:project, import_url: 'http://github.com:25/t.git')
expect(project2).to be_invalid
- expect(project2.errors[:import_url]).to include('imports are not allowed from that URL')
+ expect(project2.errors[:import_url].first).to include('Only allowed ports are 22, 80, 443')
end
describe 'project pending deletion' do