login_token: lets constantize
This commit is contained in:
parent
5daa565a80
commit
7b935a6486
2 changed files with 4 additions and 2 deletions
|
@ -401,7 +401,7 @@ describe Gestionnaire, type: :model do
|
|||
it { expect(gestionnaire.login_token_valid?('bad_token')).to be false }
|
||||
|
||||
context 'when the token as expired' do
|
||||
before { gestionnaire.update(login_token_created_at: 31.minutes.ago) }
|
||||
before { gestionnaire.update(login_token_created_at: (Gestionnaire::LOGIN_TOKEN_VALIDITY + 1.minute).ago) }
|
||||
|
||||
it { expect(gestionnaire.login_token_valid?(good_token)).to be false }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue