diff --git a/spec/controllers/auth/sessions_controller_spec.rb b/spec/controllers/auth/sessions_controller_spec.rb index 4a6956cb0..c852b16a6 100644 --- a/spec/controllers/auth/sessions_controller_spec.rb +++ b/spec/controllers/auth/sessions_controller_spec.rb @@ -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