Commit 3e49123d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix api users spec for post request with invalid id

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 137ebcfb
...@@ -410,9 +410,9 @@ describe API::API, api: true do ...@@ -410,9 +410,9 @@ describe API::API, api: true do
end.to change{ user.keys.count }.by(1) end.to change{ user.keys.count }.by(1)
end end
it "returns 404 for invalid ID" do it "returns 400 for invalid ID" do
post api("/users/999999/keys", admin) post api("/users/999999/keys", admin)
expect(response).to have_http_status(404) expect(response).to have_http_status(400)
end end
end end
...@@ -496,10 +496,10 @@ describe API::API, api: true do ...@@ -496,10 +496,10 @@ describe API::API, api: true do
end.to change{ user.emails.count }.by(1) end.to change{ user.emails.count }.by(1)
end end
it "returns a 404 for invalid ID" do it "returns a 400 for invalid ID" do
post api("/users/999999/emails", admin) post api("/users/999999/emails", admin)
expect(response).to have_http_status(404) expect(response).to have_http_status(400)
end end
end end
......
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