mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Check response body instead of assigns in settings 2fa recovery codes controller spec
This commit is contained in:
parent
4e9bd7d811
commit
a5af04e538
1 changed files with 2 additions and 1 deletions
|
@ -15,10 +15,11 @@ describe Settings::TwoFactorAuthentication::RecoveryCodesController do
|
|||
sign_in user, scope: :user
|
||||
post :create, session: { challenge_passed_at: Time.now.utc }
|
||||
|
||||
expect(assigns(:recovery_codes)).to eq otp_backup_codes
|
||||
expect(flash[:notice]).to eq 'Recovery codes successfully regenerated'
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response).to render_template(:index)
|
||||
expect(response.body)
|
||||
.to include(*otp_backup_codes)
|
||||
end
|
||||
|
||||
it 'redirects when not signed in' do
|
||||
|
|
Loading…
Reference in a new issue