2
0

Use expect for nested params in more controllers (#33675)

This commit is contained in:
Matt Jankowski
2025-01-22 03:35:34 -05:00
committed by GitHub
parent 2a6a418f48
commit d2cc28813f
8 changed files with 71 additions and 6 deletions

View File

@@ -0,0 +1,16 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'Statuses Cleanup' do
describe 'PUT /statuses_cleanup' do
before { sign_in Fabricate(:user) }
it 'gracefully handles invalid nested params' do
put statuses_cleanup_path(account_statuses_cleanup_policy: 'invalid')
expect(response)
.to have_http_status(400)
end
end
end