summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/controllers/sessions_controller_spec.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index 664b23d3214..83cc8ec6d26 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -69,7 +69,7 @@ describe SessionsController do
end
end
- context ' when OTP is invalid' do
+ context 'when OTP is invalid' do
before { authenticate_2fa(otp_attempt: 'invalid') }
it 'does not authenticate' do
@@ -77,8 +77,8 @@ describe SessionsController do
end
it 'warns about invalid OTP code' do
- expect(response).to set_flash
- .now[:alert].to /Invalid two-factor code/
+ expect(response).to set_flash.now[:alert]
+ .to /Invalid two-factor code/
end
end
end
@@ -90,7 +90,8 @@ describe SessionsController do
authenticate_2fa(login: another_user.username,
otp_attempt: 'invalid')
- expect(response).to_not set_flash.now[:alert].to /Invalid login or password/
+ expect(response).to set_flash.now[:alert]
+ .to /Invalid two-factor code/
end
end
end