diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-01 14:09:49 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-01 14:26:05 -0200 |
commit | a221b30b3fb309f1edfa0c330fd57c1efaadd509 (patch) | |
tree | c3952fdc2acc148421a1b042d814259dc7611d50 | |
parent | 9616a7ee1a18f259dd249e6df6fafcb8b8af9b10 (diff) | |
download | rails-a221b30b3fb309f1edfa0c330fd57c1efaadd509.tar.gz rails-a221b30b3fb309f1edfa0c330fd57c1efaadd509.tar.bz2 rails-a221b30b3fb309f1edfa0c330fd57c1efaadd509.zip |
Test with the right association
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 8bdbd84ad1..b824a0ee7c 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -782,12 +782,12 @@ class HasManyAssociationsTest < ActiveRecord::TestCase def test_delete_all force_signal37_to_load_all_clients_of_firm - companies(:first_firm).clients_of_firm.create("name" => "Another Client") - clients = companies(:first_firm).clients_of_firm.to_a + companies(:first_firm).dependent_clients_of_firm.create("name" => "Another Client") + clients = companies(:first_firm).dependent_clients_of_firm.to_a assert_equal 2, clients.count assert_difference "Client.count", -(clients.count) do - companies(:first_firm).clients_of_firm.delete_all + companies(:first_firm).dependent_clients_of_firm.delete_all end end |