0
0
Fork 0

Improve example wording in 2FA/confirmations controller spec (#33944)

This commit is contained in:
Matt Jankowski 2025-02-21 02:31:06 -05:00 committed by GitHub
parent fc83fdc993
commit d065d02d88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 24 deletions

View file

@ -16,4 +16,20 @@ RSpec.describe 'Settings 2FA Confirmations' do
.to have_http_status(400)
end
end
context 'when not signed in' do
it 'redirects on POST to create' do
post settings_two_factor_authentication_confirmation_path(form_two_factor_confirmation: { otp_attempt: '123456' })
expect(response)
.to redirect_to(new_user_session_path)
end
it 'redirects on GET to new' do
get new_settings_two_factor_authentication_confirmation_path
expect(response)
.to redirect_to(new_user_session_path)
end
end
end