Make sessions controller specs more explicit
This commit is contained in:
parent
00da609cfd
commit
33a8dfd04f
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue