mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
DEV: Improve flaky time-sensitive specs (#9141)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user