0
0
Fork 0

Fix Lint/AmbiguousBlockAssociation cop (#25921)

This commit is contained in:
Matt Jankowski 2023-07-12 04:02:41 -04:00 committed by GitHub
parent b786911c55
commit 658742b3cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 15 deletions

View file

@ -104,7 +104,7 @@ describe Settings::TwoFactorAuthentication::ConfirmationsController do
post :create,
params: { form_two_factor_confirmation: { otp_attempt: '123456' } },
session: { challenge_passed_at: Time.now.utc, new_otp_secret: 'thisisasecretforthespecofnewview' }
end.to not_change { user.reload.otp_secret }
end.to(not_change { user.reload.otp_secret })
end
it 'renders the new view' do

View file

@ -63,7 +63,7 @@ describe Settings::TwoFactorAuthentication::OtpAuthenticationController do
expect do
post :create, session: { challenge_passed_at: Time.now.utc }
end.to not_change { user.reload.otp_secret }
.and change { session[:new_otp_secret] }
.and(change { session[:new_otp_secret] })
expect(response).to redirect_to(new_settings_two_factor_authentication_confirmation_path)
end
@ -80,7 +80,7 @@ describe Settings::TwoFactorAuthentication::OtpAuthenticationController do
expect do
post :create, session: { challenge_passed_at: Time.now.utc }
end.to not_change { user.reload.otp_secret }
.and change { session[:new_otp_secret] }
.and(change { session[:new_otp_secret] })
expect(response).to redirect_to(new_settings_two_factor_authentication_confirmation_path)
end