aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-xactiverecord/test/associations_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb
index fc8d59e862..5cafa010f9 100755
--- a/activerecord/test/associations_test.rb
+++ b/activerecord/test/associations_test.rb
@@ -551,13 +551,15 @@ class HasManyAssociationsTest < Test::Unit::TestCase
client_id = firm.exclusively_dependent_clients_of_firm.first.id
assert_equal 1, firm.exclusively_dependent_clients_of_firm.size
+ assert_equal [], Client.destroyed_client_ids[firm.id]
+
# :exclusively_dependent means each client is deleted directly from
# the database without looping through them calling destroy.
firm.exclusively_dependent_clients_of_firm.clear
assert_equal 0, firm.exclusively_dependent_clients_of_firm.size
assert_equal 0, firm.exclusively_dependent_clients_of_firm(true).size
- assert_equal [], Client.destroyed_client_ids[firm.id]
+ assert_equal [3], Client.destroyed_client_ids[firm.id]
# Should be destroyed since the association is exclusively dependent.
assert Client.find_by_id(client_id).nil?