Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/profiles/two_factor_auths_controller_spec.rb')
-rw-r--r--spec/controllers/profiles/two_factor_auths_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/profiles/two_factor_auths_controller_spec.rb b/spec/controllers/profiles/two_factor_auths_controller_spec.rb
index f54706e3aa3..4fb1473c2d2 100644
--- a/spec/controllers/profiles/two_factor_auths_controller_spec.rb
+++ b/spec/controllers/profiles/two_factor_auths_controller_spec.rb
@@ -37,7 +37,7 @@ describe Profiles::TwoFactorAuthsController do
context 'with valid pin' do
before do
- expect(user).to receive(:valid_otp?).with(pin).and_return(true)
+ expect(user).to receive(:validate_and_consume_otp!).with(pin).and_return(true)
end
it 'sets two_factor_enabled' do
@@ -63,7 +63,7 @@ describe Profiles::TwoFactorAuthsController do
context 'with invalid pin' do
before do
- expect(user).to receive(:valid_otp?).with(pin).and_return(false)
+ expect(user).to receive(:validate_and_consume_otp!).with(pin).and_return(false)
end
it 'assigns error' do