Commit 0da5154b authored by Marin Jankovski's avatar Marin Jankovski

Fix api tests.

parent 7240150c
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment