Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-07-17 18:03:15 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-07-17 18:03:15 +0300
commitc7daa5f17fdb45cb7acc058a3a418be19c42712a (patch)
treed622a3f6741a8a7593493d16a3a6ac0ded5f1435 /spec/requests
parent302c52551a0155f3955144690f1b67ac4ef98282 (diff)
Add specs for gitlab ci service validity.
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/services_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb
index cedb5f15ead..6d29a28580a 100644
--- a/spec/requests/api/services_spec.rb
+++ b/spec/requests/api/services_spec.rb
@@ -17,6 +17,18 @@ describe API::API, api: true do
expect(response.status).to eq(400)
end
+
+ it "should return if the format of token is invalid" do
+ put api("/projects/#{project.id}/services/gitlab-ci", user), token: 'token-with dashes and spaces%', project_url: "http://ci.example.com/projects/1", active: true
+
+ expect(response.status).to eq(404)
+ end
+
+ it "should return if the format of token is invalid" do
+ put api("/projects/#{project.id}/services/gitlab-ci", user), token: 'token-with dashes and spaces%', project_url: "ftp://ci.example/projects/1", active: true
+
+ expect(response.status).to eq(404)
+ end
end
describe "DELETE /projects/:id/services/gitlab-ci" do