Skip to content
Snippets Groups Projects
Commit 3e49123d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix api users spec for post request with invalid id

parent 137ebcfb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -410,9 +410,9 @@ describe API::API, api: true do
end.to change{ user.keys.count }.by(1)
end
 
it "returns 404 for invalid ID" do
it "returns 400 for invalid ID" do
post api("/users/999999/keys", admin)
expect(response).to have_http_status(404)
expect(response).to have_http_status(400)
end
end
 
Loading
Loading
@@ -496,10 +496,10 @@ describe API::API, api: true do
end.to change{ user.emails.count }.by(1)
end
 
it "returns a 404 for invalid ID" do
it "returns a 400 for invalid ID" do
post api("/users/999999/emails", admin)
 
expect(response).to have_http_status(404)
expect(response).to have_http_status(400)
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment