about summary refs log tree commit diff
path: root/spec/controllers/settings
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-21 12:07:17 -0400
committerEugen <eugen@zeonfederated.com>2017-04-21 18:07:17 +0200
commitee0c897bba7c332ee3077db7605c9c3781cb4cb1 (patch)
treea622b385f6509a533f68156452230763637f3723 /spec/controllers/settings
parentceecf962081b858f40978829041bfc2b282ddcae (diff)
User settings mutation (#2270)
* Add user spec for settings, highlight global default mutation issue

* Fix mutation issue caused by settings/preferences spec
Diffstat (limited to 'spec/controllers/settings')
-rw-r--r--spec/controllers/settings/preferences_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/settings/preferences_controller_spec.rb b/spec/controllers/settings/preferences_controller_spec.rb
index 16cc87991..cdf595d4d 100644
--- a/spec/controllers/settings/preferences_controller_spec.rb
+++ b/spec/controllers/settings/preferences_controller_spec.rb
@@ -24,8 +24,8 @@ describe Settings::PreferencesController do
 
     it 'updates user settings' do
       user.settings['boost_modal'] = false
-      user.settings['notification_emails']['follow'] = false
-      user.settings['interactions']['must_be_follower'] = true
+      user.settings['notification_emails'] = user.settings['notification_emails'].merge('follow' => false)
+      user.settings['interactions'] = user.settings['interactions'].merge('must_be_follower' => true)
 
       put :update, params: {
         user: {