diff --git a/app/controllers/concerns/idv/phone_otp_sendable.rb b/app/controllers/concerns/idv/phone_otp_sendable.rb index 0d6c5c77b4f..31c5804f667 100644 --- a/app/controllers/concerns/idv/phone_otp_sendable.rb +++ b/app/controllers/concerns/idv/phone_otp_sendable.rb @@ -2,10 +2,6 @@ module Idv module PhoneOtpSendable extend ActiveSupport::Concern - included do - before_action :handle_locked_out_user - end - def send_phone_confirmation_otp send_phone_confirmation_otp_service.call end diff --git a/spec/features/idv/doc_auth/verify_info_step_spec.rb b/spec/features/idv/doc_auth/verify_info_step_spec.rb index dbbeca74952..7061684f13e 100644 --- a/spec/features/idv/doc_auth/verify_info_step_spec.rb +++ b/spec/features/idv/doc_auth/verify_info_step_spec.rb @@ -181,13 +181,15 @@ visit idv_verify_info_url expect(page).to have_current_path(idv_session_errors_failure_path) + # Manual expiration is needed because Redis timestamp doesn't always match ruby timestamp + RateLimiter.new(user: user, rate_limit_type: :idv_resolution).reset! travel_to(IdentityConfig.store.idv_attempt_window_in_hours.hours.from_now + 1) do sign_in_and_2fa_user(user) complete_doc_auth_steps_before_verify_step complete_verify_step expect(page).to have_current_path(idv_phone_path) - expect(RateLimiter.new(user: user, rate_limit_type: :idv_resolution)).to be_limited + expect(RateLimiter.new(user: user, rate_limit_type: :idv_resolution)).to_not be_limited end end @@ -232,12 +234,15 @@ visit idv_verify_info_url expect(page).to have_current_path(idv_session_errors_ssn_failure_path) + # Manual expiration is needed because Redis timestamp doesn't always match ruby timestamp + RateLimiter.new(user: user, rate_limit_type: :idv_resolution).reset! travel_to(IdentityConfig.store.idv_attempt_window_in_hours.hours.from_now + 1) do sign_in_and_2fa_user(user) complete_doc_auth_steps_before_verify_step complete_verify_step expect(page).to have_current_path(idv_phone_path) + expect(RateLimiter.new(user: user, rate_limit_type: :idv_resolution)).to_not be_limited end end