diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-07-17 17:03:15 +0200 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-07-17 17:03:15 +0200 |
commit | c7daa5f17fdb45cb7acc058a3a418be19c42712a (patch) | |
tree | d622a3f6741a8a7593493d16a3a6ac0ded5f1435 /spec/requests | |
parent | 302c52551a0155f3955144690f1b67ac4ef98282 (diff) | |
download | gitlab-ce-c7daa5f17fdb45cb7acc058a3a418be19c42712a.tar.gz |
Add specs for gitlab ci service validity.
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/services_spec.rb | 12 |
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 |