diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-02-29 13:56:40 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-29 13:56:40 -0500 |
commit | 3334c3fc7026497fc9da258824795c0ce23a8ffd (patch) | |
tree | 319a10073764e84cd0fc7855c7ff26b872a41776 /spec/models/user_spec.rb | |
parent | 333ad73e765d87fa1ccbd4a361f7f172c790f897 (diff) | |
download | gitlab-ce-3334c3fc7026497fc9da258824795c0ce23a8ffd.tar.gz |
Reset `otp_grace_period_started_at` after disabling 2FA
Prior, if the user enabled 2FA, then disabled it and came back some time
after the grace period expired, they would be forced to enable 2FA
immediately.
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 88821dd0dad..7ad7aab2eec 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -268,6 +268,7 @@ describe User, models: true do expect(user).to be_two_factor_enabled expect(user.encrypted_otp_secret).not_to be_nil expect(user.otp_backup_codes).not_to be_nil + expect(user.otp_grace_period_started_at).not_to be_nil user.disable_two_factor! @@ -276,6 +277,7 @@ describe User, models: true do expect(user.encrypted_otp_secret_iv).to be_nil expect(user.encrypted_otp_secret_salt).to be_nil expect(user.otp_backup_codes).to be_nil + expect(user.otp_grace_period_started_at).to be_nil end end |