diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-08-09 08:23:34 -0600 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-08-09 09:43:57 -0600 |
commit | 4efc4f5b3131b54922543e0973ce8d5e74051183 (patch) | |
tree | 967d9c858960b1b1a66392c6ba9fc84942070a3d | |
parent | c53b599e61027e910aa0425150373cb30c67b150 (diff) | |
download | gitlab-ce-4efc4f5b3131b54922543e0973ce8d5e74051183.tar.gz |
Fix Grape tests.
-rw-r--r-- | spec/requests/api/users_spec.rb | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 69b5072a81e..e0e041b4e15 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -398,9 +398,9 @@ describe API::API, api: true do end.to change{ user.keys.count }.by(1) end - it "returns 405 for invalid ID" do - post api("/users/ASDF/keys", admin) - expect(response).to have_http_status(405) + it "returns 400 for invalid ID" do + post api("/users/999999/keys", admin) + expect(response).to have_http_status(400) end end @@ -429,11 +429,6 @@ describe API::API, api: true do expect(json_response).to be_an Array expect(json_response.first['title']).to eq(key.title) end - - it "returns 405 for invalid ID" do - get api("/users/ASDF/keys", admin) - expect(response).to have_http_status(405) - end end end @@ -490,8 +485,8 @@ describe API::API, api: true do end it "raises error for invalid ID" do - post api("/users/ASDF/emails", admin) - expect(response).to have_http_status(405) + post api("/users/999999/emails", admin) + expect(response).to have_http_status(400) end end |