Commit beafa3f
Changed files (2)
app
controllers
spec
requests
app/controllers/application_controller.rb
@@ -33,6 +33,7 @@ class ApplicationController < ActionController::Base
def authenticate_mfa!
return unless current_user?
- redirect_to mfa_path unless current_user.tfa.valid_session?(session[:mfa])
+ mfa = current_user.tfa
+ redirect_to new_mfa_path unless mfa.valid_session?(session[:mfa])
end
end
spec/requests/response_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe "/response" do
before { get '/response' }
- specify { expect(response).to redirect_to(mfa_path) }
+ specify { expect(response).to redirect_to(new_mfa_path) }
end
end
end