diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-12-30 15:40:11 +0100 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-12-30 15:40:11 +0100 |
commit | 0da5154b5a71216a9bbff861561636906ca8c167 (patch) | |
tree | 3c256b1da54605a20e6dc8fb439ed5e7fe74ddf0 /spec | |
parent | 7240150c8986c7aa21d0eb3140ac9a4c7674a4d2 (diff) | |
download | gitlab-ce-0da5154b5a71216a9bbff861561636906ca8c167.tar.gz |
Fix api tests.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/fork_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/api/groups_spec.rb | 3 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/spec/requests/api/fork_spec.rb b/spec/requests/api/fork_spec.rb index cbbd1e7de5a..5921b3e0698 100644 --- a/spec/requests/api/fork_spec.rb +++ b/spec/requests/api/fork_spec.rb @@ -44,7 +44,7 @@ describe API::API, api: true do it 'should fail on missing project access for the project to fork' do post api("/projects/fork/#{project.id}", user3) response.status.should == 404 - json_response['message'].should == '404 Not Found' + json_response['message'].should == '404 Project Not Found' end it 'should fail if forked project exists in the user namespace' do @@ -58,7 +58,7 @@ describe API::API, api: true do it 'should fail if project to fork from does not exist' do post api('/projects/fork/424242', user) response.status.should == 404 - json_response['message'].should == '404 Not Found' + json_response['message'].should == '404 Project Not Found' end end diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index 8dfd2cd650e..a5aade06cba 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -91,7 +91,8 @@ describe API::API, api: true do it "should not create group, duplicate" do post api("/groups", admin), {name: "Duplicate Test", path: group2.path} - response.status.should == 404 + response.status.should == 422 + response.message.should == "Unprocessable Entity" end it "should return 400 bad request error if name not given" do diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index f8c5d40b9bf..79865f15f06 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -289,7 +289,7 @@ describe API::API, api: true do it "should return a 404 error if not found" do get api("/projects/42", user) response.status.should == 404 - json_response['message'].should == '404 Not Found' + json_response['message'].should == '404 Project Not Found' end it "should return a 404 error if user is not a member" do @@ -340,7 +340,7 @@ describe API::API, api: true do it "should return a 404 error if not found" do get api("/projects/42/events", user) response.status.should == 404 - json_response['message'].should == '404 Not Found' + json_response['message'].should == '404 Project Not Found' end it "should return a 404 error if user is not a member" do |