tags: eliminate Tag.category_for method.
Tag.category_for looked up a tag's category in the Redis cache. This was only used in a few places (in related tags, and on the popular/missed search pages). Get rid of this method so we can work towards getting rid of caching tag categories in Redis.
This commit is contained in:
@@ -13,16 +13,6 @@ class TagTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
context "A tag category fetcher" do
|
||||
should "fetch for a single tag" do
|
||||
FactoryBot.create(:artist_tag, :name => "test")
|
||||
assert_equal(Tag.categories.artist, Tag.category_for("test"))
|
||||
end
|
||||
|
||||
should "fetch for a single tag with strange markup" do
|
||||
FactoryBot.create(:artist_tag, :name => "!@$%")
|
||||
assert_equal(Tag.categories.artist, Tag.category_for("!@$%"))
|
||||
end
|
||||
|
||||
should "fetch for multiple tags" do
|
||||
FactoryBot.create(:artist_tag, :name => "aaa")
|
||||
FactoryBot.create(:copyright_tag, :name => "bbb")
|
||||
|
||||
Reference in New Issue
Block a user