aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-06-07 20:02:49 +0100
committerJon Leighton <j@jonathanleighton.com>2012-06-07 20:02:49 +0100
commit959fb8ea651fa6638aaa7caced20d921ca2ea5c1 (patch)
treea9d1cea0486d309cf57f7c716f35e98d83a5f6c5 /activerecord/test
parent6b6c1de9f96d27af73371b1595c4b9ff76bb59bc (diff)
downloadrails-959fb8ea651fa6638aaa7caced20d921ca2ea5c1.tar.gz
rails-959fb8ea651fa6638aaa7caced20d921ca2ea5c1.tar.bz2
rails-959fb8ea651fa6638aaa7caced20d921ca2ea5c1.zip
Revert "Perf: Don't load the association for #delete_all."
This reverts commit b98d1e21635d8776de8893cc09bd86c71f6c78f0. Closes #6609 Conflicts: activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 4f50c97147..a51ce26117 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -1698,16 +1698,4 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
assert_equal [bulb1, bulb3], car.bulbs
assert_equal [bulb1, bulb3], result
end
-
- test "delete_all, when not loaded, doesn't load the records" do
- post = posts(:welcome)
-
- assert post.taggings_with_delete_all.count > 0
- assert !post.taggings_with_delete_all.loaded?
-
- # 2 queries: one DELETE and another to update the counter cache
- assert_queries(2) do
- post.taggings_with_delete_all.delete_all
- end
- end
end