aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/association_callbacks_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/association_callbacks_test.rb')
-rw-r--r--activerecord/test/association_callbacks_test.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/activerecord/test/association_callbacks_test.rb b/activerecord/test/association_callbacks_test.rb
index 1426fb71a9..d0f7fa67de 100644
--- a/activerecord/test/association_callbacks_test.rb
+++ b/activerecord/test/association_callbacks_test.rb
@@ -111,14 +111,16 @@ class AssociationCallbacksTest < Test::Unit::TestCase
end
def test_push_with_attributes
- david = developers(:david)
- activerecord = projects(:active_record)
- assert activerecord.developers_log.empty?
- activerecord.developers_with_callbacks.push_with_attributes(david, {})
- assert_equal ["before_adding#{david.id}", "after_adding#{david.id}"], activerecord.developers_log
- activerecord.developers_with_callbacks.push_with_attributes(david, {})
- assert_equal ["before_adding#{david.id}", "after_adding#{david.id}", "before_adding#{david.id}",
- "after_adding#{david.id}"], activerecord.developers_log
+ assert_deprecated 'push_with_attributes' do
+ david = developers(:david)
+ activerecord = projects(:active_record)
+ assert activerecord.developers_log.empty?
+ activerecord.developers_with_callbacks.push_with_attributes(david, {})
+ assert_equal ["before_adding#{david.id}", "after_adding#{david.id}"], activerecord.developers_log
+ activerecord.developers_with_callbacks.push_with_attributes(david, {})
+ assert_equal ["before_adding#{david.id}", "after_adding#{david.id}", "before_adding#{david.id}",
+ "after_adding#{david.id}"], activerecord.developers_log
+ end
end
end