Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-15 16:24:37 +0300
committerJames Lopez <james@jameslopez.es>2017-06-23 12:41:41 +0300
commit04bb82c8b8cb3033c805ea5158b01c09284ac3db (patch)
tree4cbf0d64425b8ff2ead9796b792f63dfc3d68051 /spec/controllers
parent949808529c3d7947279eb8ff89f9644fc8505550 (diff)
update preferences controller
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/profiles/preferences_controller_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/controllers/profiles/preferences_controller_spec.rb b/spec/controllers/profiles/preferences_controller_spec.rb
index 7b3aa0491c7..a5f544b4f92 100644
--- a/spec/controllers/profiles/preferences_controller_spec.rb
+++ b/spec/controllers/profiles/preferences_controller_spec.rb
@@ -43,7 +43,8 @@ describe Profiles::PreferencesController do
dashboard: 'stars'
}.with_indifferent_access
- expect(user).to receive(:update_attributes).with(prefs)
+ expect(user).to receive(:assign_attributes).with(prefs)
+ expect(user).to receive(:save)
go params: prefs
end
@@ -51,7 +52,7 @@ describe Profiles::PreferencesController do
context 'on failed update' do
it 'sets the flash' do
- expect(user).to receive(:update_attributes).and_return(false)
+ expect(user).to receive(:save).and_return(false)
go