Use correct params in settings/preferences/appearance spec (#30379)

This commit is contained in:
Matt Jankowski 2024-06-11 03:36:46 -04:00 committed by GitHub
parent b2496177e0
commit edf6d64eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,8 +23,11 @@ describe Settings::Preferences::AppearanceController do
end
describe 'PUT #update' do
subject { put :update, params: { user: { settings_attributes: { theme: 'contrast' } } } }
it 'redirects correctly' do
put :update, params: { user: { setting_theme: 'contrast' } }
expect { subject }
.to change { user.reload.settings.theme }.to('contrast')
expect(response).to redirect_to(settings_preferences_appearance_path)
end