diff options
| author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-27 11:24:12 +0100 |
|---|---|---|
| committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-27 11:24:12 +0100 |
| commit | e119b0a0cb33b1b7f2dafcf17c2a94af40aed833 (patch) | |
| tree | 005d96464874df21cb804a3996788557d56b5fe6 /spec | |
| parent | ac4a09e9cca9018dbb8e52446078b91a4b87e410 (diff) | |
| download | gitlab-ce-e119b0a0cb33b1b7f2dafcf17c2a94af40aed833.tar.gz | |
API repository documentation updated, includes infos to return codes
The API documentation of repository is updated and now contains infos to status codes.
Code documentation is also adjusted for `GET /projects/:id/repository/commits` and includes infos to
pagination attributes. Tests are updated.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/requests/api/projects_spec.rb | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 8ab7d825a20..9fbdd52eefc 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -433,14 +433,19 @@ describe Gitlab::API do end it "should return success when deleting hook" do - delete api("/projects/#{project.id}/hooks/#{hook.id}", user) + delete api("/projects/#{project.id}/hooks", user), hook_id: hook.id response.status.should == 200 end it "should return success when deleting non existent hook" do - delete api("/projects/#{project.id}/hooks/42", user) + delete api("/projects/#{project.id}/hooks", user), hook_id: 42 response.status.should == 200 end + + it "should return a 400 error if hook id not given" do + delete api("/projects/#{project.id}/hooks", user) + response.status.should == 400 + end end describe "GET /projects/:id/repository/tags" do @@ -480,11 +485,6 @@ describe Gitlab::API do json_response.should be_an Array json_response.first['title'].should == snippet.title end - - it "should return 401 error if user not authenticated" do - get api("/projects/#{project.id}/snippets") - response.status.should == 401 - end end describe "GET /projects/:id/snippets/:snippet_id" do @@ -525,12 +525,6 @@ describe Gitlab::API do title: 'api test', file_name: 'sample.rb' response.status.should == 400 end - - it "should return a 401 error if user not authenticated" do - post api("/projects/#{project.id}/snippets"), - title: 'api test', file_name: 'sample.rb', code: 'i=0' - response.status.should == 401 - end end describe "PUT /projects/:id/snippets/:shippet_id" do |
