Check response body instead of assigns in settings 2fa confirmations controller spec

This commit is contained in:
Matt Jankowski 2024-04-30 12:14:44 -04:00
parent cb2f1e3d4b
commit 25fa2226ec
1 changed files with 1 additions and 1 deletions

View File

@ -61,10 +61,10 @@ describe Settings::TwoFactorAuthentication::ConfirmationsController do
expect { post_create_with_options }
.to change { user.reload.otp_secret }.to 'thisisasecretforthespecofnewview'
expect(assigns(:recovery_codes)).to eq otp_backup_codes
expect(flash[:notice]).to eq 'Two-factor authentication successfully enabled'
expect(response).to have_http_status(200)
expect(response).to render_template('settings/two_factor_authentication/recovery_codes/index')
expect(response.body).to include(*otp_backup_codes)
end
end