Use expect
params wrapper for more "auth" and "2FA" "controllers" (#33717)
This commit is contained in:
parent
e44b78413a
commit
a1d9c3fb99
8 changed files with 77 additions and 10 deletions
16
spec/requests/settings/verifications_spec.rb
Normal file
16
spec/requests/settings/verifications_spec.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Settings Verifications' do
|
||||
describe 'PUT /settings/verification' do
|
||||
before { sign_in Fabricate(:user) }
|
||||
|
||||
it 'gracefully handles invalid nested params' do
|
||||
put settings_verification_path(account: 'invalid')
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(400)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue