1
0
Fork 0
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:
Matt Jankowski 2024-04-30 12:10:10 -04:00
parent 4e9bd7d811
commit a5af04e538

View file

@ -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