From 493dd777ca73f7e3c68570d788f8c7ec1a0192be Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 28 May 2014 21:50:31 +0000 Subject: [PATCH] profile-editor-test: fix update_attributes stubs and pass only necessary to profile_data --- test/functional/profile_editor_controller_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index 35c1259..29604a5 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -211,14 +211,14 @@ class ProfileEditorControllerTest < ActionController::TestCase should 'back when update community info fail' do org = fast_create(Community) - Community.any_instance.stubs(:update_attributes!).returns(false) + Community.any_instance.stubs(:update_attributes).returns(false) post :edit, :profile => org.identifier assert_template 'edit' end should 'back when update enterprise info fail' do org = fast_create(Enterprise) - Enterprise.any_instance.stubs(:update_attributes!).returns(false) + Enterprise.any_instance.stubs(:update_attributes).returns(false) post :edit, :profile => org.identifier assert_template 'edit' end @@ -744,7 +744,7 @@ class ProfileEditorControllerTest < ActionController::TestCase should 'not crash if identifier is left blank' do c = fast_create(Community) assert_nothing_raised do - post :edit, :profile => c.identifier, :profile_data => c.attributes.merge('identifier' => '') + post :edit, :profile => c.identifier, :profile_data => {:identifier => ''} end end -- libgit2 0.21.2