diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-12-10 14:48:12 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-12-10 14:48:12 -0800 |
commit | b30ae1974851b20ef430df9de17e6e79e5b25ad2 (patch) | |
tree | 160b26560998d5b7f9ed7148a4779e6af1b847a5 /activerecord/test/cases/associations/has_many_through_associations_test.rb | |
parent | 96b815d7e81b9cef912ef94c96dca923fe43b0ba (diff) | |
download | rails-b30ae1974851b20ef430df9de17e6e79e5b25ad2.tar.gz rails-b30ae1974851b20ef430df9de17e6e79e5b25ad2.tar.bz2 rails-b30ae1974851b20ef430df9de17e6e79e5b25ad2.zip |
Revert "Fix: counter_cache should decrement on deleting associated records."
[#1196 state:open]
This reverts commit 05f2183747c8e75c9e8bbaadb9573b4bdf41ecfc.
Diffstat (limited to 'activerecord/test/cases/associations/has_many_through_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index ba3428a508..a07f4bcbdd 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -3,9 +3,6 @@ require 'models/post' require 'models/person' require 'models/reader' require 'models/comment' -require 'models/tag' -require 'models/tagging' -require 'models/author' class HasManyThroughAssociationsTest < ActiveRecord::TestCase fixtures :posts, :readers, :people, :comments, :authors @@ -87,17 +84,6 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase assert posts(:welcome).reload.people(true).empty? end - def test_deleting_updates_counter_cache - taggable = Tagging.first.taggable - taggable.taggings.push(Tagging.new) - taggable.reload - assert_equal 1, taggable.taggings_count - - taggable.taggings.delete(taggable.taggings.first) - taggable.reload - assert_equal 0, taggable.taggings_count - end - def test_replace_association assert_queries(4){posts(:welcome);people(:david);people(:michael); posts(:welcome).people(true)} |