diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-07 16:39:57 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-10 16:32:32 +0300 |
commit | d6cfc0042ed2ce9a33f31a6c44661c136e861b98 (patch) | |
tree | d96cc71bbe74bfc25c810f3680ee8a8ad2364681 /spec/requests/api/users_spec.rb | |
parent | 68ab7047dae98172a0bd8b92956f2ee51b9167a0 (diff) | |
download | gitlab-ce-d6cfc0042ed2ce9a33f31a6c44661c136e861b98.tar.gz |
Catch any undefined API routing and return 400 Bad Request
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/requests/api/users_spec.rb')
-rw-r--r-- | spec/requests/api/users_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index f4ea3bebb4c..c040000e8bb 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -90,9 +90,9 @@ describe API::API, api: true do expect(json_response['message']).to eq('404 Not found') end - it "returns a 404 if invalid ID" do + it "returns a 400 if invalid ID" do get api("/users/1ASDF", user) - expect(response).to have_http_status(404) + expect(response).to have_http_status(400) end end |