From edf6d64eebdf4c1651f09c0e314d46b7436b46df Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 11 Jun 2024 03:36:46 -0400 Subject: [PATCH] Use correct params in `settings/preferences/appearance` spec (#30379) --- .../settings/preferences/appearance_controller_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/controllers/settings/preferences/appearance_controller_spec.rb b/spec/controllers/settings/preferences/appearance_controller_spec.rb index 261c426acb..84b8277250 100644 --- a/spec/controllers/settings/preferences/appearance_controller_spec.rb +++ b/spec/controllers/settings/preferences/appearance_controller_spec.rb @@ -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