Commit 493dd777ca73f7e3c68570d788f8c7ec1a0192be
1 parent
e62c61b7
Exists in
master
and in
29 other branches
profile-editor-test: fix update_attributes stubs and pass only necessary to profile_data
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
test/functional/profile_editor_controller_test.rb
... | ... | @@ -211,14 +211,14 @@ class ProfileEditorControllerTest < ActionController::TestCase |
211 | 211 | |
212 | 212 | should 'back when update community info fail' do |
213 | 213 | org = fast_create(Community) |
214 | - Community.any_instance.stubs(:update_attributes!).returns(false) | |
214 | + Community.any_instance.stubs(:update_attributes).returns(false) | |
215 | 215 | post :edit, :profile => org.identifier |
216 | 216 | assert_template 'edit' |
217 | 217 | end |
218 | 218 | |
219 | 219 | should 'back when update enterprise info fail' do |
220 | 220 | org = fast_create(Enterprise) |
221 | - Enterprise.any_instance.stubs(:update_attributes!).returns(false) | |
221 | + Enterprise.any_instance.stubs(:update_attributes).returns(false) | |
222 | 222 | post :edit, :profile => org.identifier |
223 | 223 | assert_template 'edit' |
224 | 224 | end |
... | ... | @@ -744,7 +744,7 @@ class ProfileEditorControllerTest < ActionController::TestCase |
744 | 744 | should 'not crash if identifier is left blank' do |
745 | 745 | c = fast_create(Community) |
746 | 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 | 748 | end |
749 | 749 | end |
750 | 750 | ... | ... |