Commit 493dd777ca73f7e3c68570d788f8c7ec1a0192be

Authored by Rodrigo Souto
1 parent e62c61b7

profile-editor-test: fix update_attributes stubs and pass only necessary to profile_data

test/functional/profile_editor_controller_test.rb
@@ -211,14 +211,14 @@ class ProfileEditorControllerTest < ActionController::TestCase @@ -211,14 +211,14 @@ class ProfileEditorControllerTest < ActionController::TestCase
211 211
212 should 'back when update community info fail' do 212 should 'back when update community info fail' do
213 org = fast_create(Community) 213 org = fast_create(Community)
214 - Community.any_instance.stubs(:update_attributes!).returns(false) 214 + Community.any_instance.stubs(:update_attributes).returns(false)
215 post :edit, :profile => org.identifier 215 post :edit, :profile => org.identifier
216 assert_template 'edit' 216 assert_template 'edit'
217 end 217 end
218 218
219 should 'back when update enterprise info fail' do 219 should 'back when update enterprise info fail' do
220 org = fast_create(Enterprise) 220 org = fast_create(Enterprise)
221 - Enterprise.any_instance.stubs(:update_attributes!).returns(false) 221 + Enterprise.any_instance.stubs(:update_attributes).returns(false)
222 post :edit, :profile => org.identifier 222 post :edit, :profile => org.identifier
223 assert_template 'edit' 223 assert_template 'edit'
224 end 224 end
@@ -744,7 +744,7 @@ class ProfileEditorControllerTest < ActionController::TestCase @@ -744,7 +744,7 @@ class ProfileEditorControllerTest < ActionController::TestCase
744 should 'not crash if identifier is left blank' do 744 should 'not crash if identifier is left blank' do
745 c = fast_create(Community) 745 c = fast_create(Community)
746 assert_nothing_raised do 746 assert_nothing_raised do
747 - post :edit, :profile => c.identifier, :profile_data => c.attributes.merge('identifier' => '') 747 + post :edit, :profile => c.identifier, :profile_data => {:identifier => ''}
748 end 748 end
749 end 749 end
750 750