DEV: Improve flaky time-sensitive specs (#9141)

This commit is contained in:
Jarek Radosz
2020-03-10 22:13:17 +01:00
committed by GitHub
parent f795c1b8e8
commit 29b35aa64c
49 changed files with 334 additions and 331 deletions

View File

@ -69,7 +69,7 @@ RSpec.describe SecondFactorManager do
token = user.user_second_factors.totps.first.totp_object.now
expect(user.authenticate_totp(token)).to eq(true)
expect(user.user_second_factors.totps.first.last_used).to eq_time(DateTime.now)
expect(user.user_second_factors.totps.first.last_used).to eq_time(Time.zone.now)
expect(user.authenticate_totp(token)).to eq(false)
end
end