Verify page content in 2FA portion of `auth/sessions` controller spec (#33891)

pull/33901/head
Matt Jankowski 2 weeks ago committed by GitHub
parent 4c597d5e2c
commit aa10e8f399
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -223,8 +223,8 @@ RSpec.describe Auth::SessionsController do
end
it 'renders two factor authentication page' do
expect(controller).to render_template('two_factor')
expect(controller).to render_template(partial: '_otp_authentication_form')
expect(response.body)
.to include(I18n.t('simple_form.hints.sessions.otp'))
end
end
@ -239,8 +239,8 @@ RSpec.describe Auth::SessionsController do
end
it 'renders two factor authentication page' do
expect(controller).to render_template('two_factor')
expect(controller).to render_template(partial: '_otp_authentication_form')
expect(response.body)
.to include(I18n.t('simple_form.hints.sessions.otp'))
end
end
@ -250,8 +250,8 @@ RSpec.describe Auth::SessionsController do
end
it 'renders two factor authentication page' do
expect(controller).to render_template('two_factor')
expect(controller).to render_template(partial: '_otp_authentication_form')
expect(response.body)
.to include(I18n.t('simple_form.hints.sessions.otp'))
end
end
@ -378,8 +378,8 @@ RSpec.describe Auth::SessionsController do
end
it 'renders webauthn authentication page' do
expect(controller).to render_template('two_factor')
expect(controller).to render_template(partial: '_webauthn_form')
expect(response.body)
.to include(I18n.t('simple_form.title.sessions.webauthn'))
end
end
@ -389,8 +389,8 @@ RSpec.describe Auth::SessionsController do
end
it 'renders webauthn authentication page' do
expect(controller).to render_template('two_factor')
expect(controller).to render_template(partial: '_webauthn_form')
expect(response.body)
.to include(I18n.t('simple_form.title.sessions.webauthn'))
end
end

Loading…
Cancel
Save