mirror of https://github.com/mastodon/mastodon
Check response body instead of assigns in settings 2fa confirmations controller spec
This commit is contained in:
parent
cb2f1e3d4b
commit
25fa2226ec
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue