summaryrefslogtreecommitdiff
path: root/spec/requests/api/session_spec.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-10-24 07:52:21 +0000
committerMike Greiling <mike@pixelcog.com>2017-10-24 07:52:21 +0000
commitf7bdfe5098c9a5a3a426344ba1d7dd668212cf7e (patch)
tree5a1cb2a90b0a2b5114f6f23712b68724b3e8a7e0 /spec/requests/api/session_spec.rb
parent9cd528aa7ac5066570cb50b909951a6c6b723935 (diff)
parente16add2267648d3d3ef1d98f9b53f67a29428791 (diff)
downloadgitlab-ce-es-module-autosave.tar.gz
Merge branch 'master' into 'es-module-autosave'es-module-autosave
# Conflicts: # app/assets/javascripts/issuable_form.js # app/assets/javascripts/notes.js
Diffstat (limited to 'spec/requests/api/session_spec.rb')
-rw-r--r--spec/requests/api/session_spec.rb16
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