diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2016-07-17 21:58:13 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2016-07-17 21:58:13 +0300 |
commit | 872350a54f84dc9ddf19dfe2ae390f5245992166 (patch) | |
tree | f6946366b75966f03a95277a7c218b524004adfd /activerecord | |
parent | 6bb46ae2e8979479ba5603b50d8e07e07b46ba6d (diff) | |
download | rails-872350a54f84dc9ddf19dfe2ae390f5245992166.tar.gz rails-872350a54f84dc9ddf19dfe2ae390f5245992166.tar.bz2 rails-872350a54f84dc9ddf19dfe2ae390f5245992166.zip |
Refactored test `HasManyAssociationsTest#test_do_not_call_callbacks_for_delete_all`
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 7ec0dfce7a..61a5c2c3b7 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -244,8 +244,9 @@ class HasManyAssociationsTest < ActiveRecord::TestCase def test_do_not_call_callbacks_for_delete_all car = Car.create(:name => 'honda') car.funky_bulbs.create! + assert_equal 1, car.funky_bulbs.count assert_nothing_raised { car.reload.funky_bulbs.delete_all } - assert_equal 0, Bulb.count, "bulbs should have been deleted using :delete_all strategy" + assert_equal 0, car.funky_bulbs.count, "bulbs should have been deleted using :delete_all strategy" end def test_delete_all_on_association_is_the_same_as_not_loaded |