mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-24 19:37:26 +00:00
Use expect params wrapper for more "auth" and "2FA" "controllers" (#33717)
This commit is contained in:
@@ -40,5 +40,23 @@ RSpec.describe 'Settings / Exports' do
|
||||
expect(response)
|
||||
.to redirect_to(settings_applications_path)
|
||||
end
|
||||
|
||||
it 'gracefully handles invalid nested params' do
|
||||
post settings_applications_path(doorkeeper_application: 'invalid')
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(400)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'PUT /settings/applications/:id' do
|
||||
let(:application) { Fabricate :application, owner: user }
|
||||
|
||||
it 'gracefully handles invalid nested params' do
|
||||
put settings_application_path(application.id, doorkeeper_application: 'invalid')
|
||||
|
||||
expect(response)
|
||||
.to have_http_status(400)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user