diff options
Diffstat (limited to 'activerecord/test/cases/autosave_association_test.rb')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 16ce150396..e5cb4f8f7a 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -161,16 +161,16 @@ class TestDefaultAutosaveAssociationOnAHasOneAssociation < ActiveRecord::TestCas end def test_callbacks_firing_order_on_update - eye = Eye.create(:iris_attributes => {:color => 'honey'}) - eye.update_attributes(:iris_attributes => {:color => 'green'}) + eye = Eye.create(iris_attributes: {color: 'honey'}) + eye.update(iris_attributes: {color: 'green'}) assert_equal [true, false], eye.after_update_callbacks_stack end def test_callbacks_firing_order_on_save - eye = Eye.create(:iris_attributes => {:color => 'honey'}) + eye = Eye.create(iris_attributes: {color: 'honey'}) assert_equal [false, false], eye.after_save_callbacks_stack - eye.update_attributes(:iris_attributes => {:color => 'blue'}) + eye.update(iris_attributes: {color: 'blue'}) assert_equal [false, false, false, false], eye.after_save_callbacks_stack end end |