change how tag counts are recalculated after a tag category changes
This commit is contained in:
@@ -91,9 +91,11 @@ class TagTest < ActiveSupport::TestCase
|
||||
|
||||
should "reset its category after updating" do
|
||||
tag = FactoryGirl.create(:artist_tag)
|
||||
tag.update_category_cache_for_all
|
||||
assert_equal(Tag.categories.artist, MEMCACHE.get("tc:#{tag.name}"))
|
||||
|
||||
|
||||
tag.update_attribute(:category, Tag.categories.copyright)
|
||||
tag.update_category_cache_for_all
|
||||
assert_equal(Tag.categories.copyright, MEMCACHE.get("tc:#{tag.name}"))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user