Permalink
Browse files

Fix broken delete_all test, which will now be failing since #delete_a…

…ll is broken
  • Loading branch information...
1 parent e562dde commit ab177d8cbe3ed208334ce9f550aa7afff65ba334 @dhh dhh committed Oct 29, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/cases/associations/has_many_associations_test.rb
View
8 activerecord/test/cases/associations/has_many_associations_test.rb
@@ -785,10 +785,10 @@ def test_delete_all
companies(:first_firm).clients_of_firm.create("name" => "Another Client")
clients = companies(:first_firm).clients_of_firm.to_a
assert_equal 2, clients.count
- deleted = companies(:first_firm).clients_of_firm.delete_all
- assert_equal clients.sort_by(&:id), deleted.sort_by(&:id)
- assert_equal 0, companies(:first_firm).clients_of_firm.size
- assert_equal 0, companies(:first_firm).clients_of_firm(true).size
+
+ assert_difference "Client.count", -(clients.count) do
+ companies(:first_firm).clients_of_firm.delete_all
+ end
end
def test_delete_all_with_not_yet_loaded_association_collection

0 comments on commit ab177d8

Please sign in to comment.