diff options
Diffstat (limited to 'spec/requests/api/session_spec.rb')
-rw-r--r-- | spec/requests/api/session_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/api/session_spec.rb b/spec/requests/api/session_spec.rb index 5e77519c867..83d09878813 100644 --- a/spec/requests/api/session_spec.rb +++ b/spec/requests/api/session_spec.rb @@ -7,7 +7,7 @@ describe API::Session do context "when valid password" do it "returns private token" do post api("/session"), email: user.email, password: '12345678' - expect(response).to have_http_status(201) + expect(response).to have_gitlab_http_status(201) expect(json_response['email']).to eq(user.email) expect(json_response['private_token']).to eq(user.private_token) @@ -22,7 +22,7 @@ describe API::Session do post api('/session'), email: user.email, password: user.password - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) expect(response.body).to include('You have 2FA enabled.') end end @@ -57,7 +57,7 @@ describe API::Session do context "when invalid password" do it "returns authentication error" do post api("/session"), email: user.email, password: '123' - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) expect(json_response['email']).to be_nil expect(json_response['private_token']).to be_nil @@ -68,13 +68,13 @@ describe API::Session do it "returns authentication error with email" do post api("/session"), email: user.email - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) end it "returns authentication error with username" do post api("/session"), email: user.username - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) end end @@ -82,7 +82,7 @@ describe API::Session do it "returns authentication error" do post api("/session"), password: user.password - expect(response).to have_http_status(400) + expect(response).to have_gitlab_http_status(400) end end @@ -91,7 +91,7 @@ describe API::Session do user.block post api("/session"), email: user.username, password: user.password - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) end end @@ -100,7 +100,7 @@ describe API::Session do user.ldap_block post api("/session"), email: user.username, password: user.password - expect(response).to have_http_status(401) + expect(response).to have_gitlab_http_status(401) end end end |