File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
activerecord/test/cases/associations Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -785,10 +785,10 @@ def test_delete_all
785
785
companies ( :first_firm ) . clients_of_firm . create ( "name" => "Another Client" )
786
786
clients = companies ( :first_firm ) . clients_of_firm . to_a
787
787
assert_equal 2 , clients . count
788
- deleted = companies ( :first_firm ) . clients_of_firm . delete_all
789
- assert_equal clients . sort_by ( & :id ) , deleted . sort_by ( & :id )
790
- assert_equal 0 , companies ( :first_firm ) . clients_of_firm . size
791
- assert_equal 0 , companies ( :first_firm ) . clients_of_firm ( true ) . size
788
+
789
+ assert_difference "Client.count" , - ( clients . count ) do
790
+ companies ( :first_firm ) . clients_of_firm . delete_all
791
+ end
792
792
end
793
793
794
794
def test_delete_all_with_not_yet_loaded_association_collection
You can’t perform that action at this time.
0 commit comments