tags: remove Tag.trending method.
This is used for the frontpage taglist when popular searches are disabled. This isn't used in production and there's no need for it in development.
This commit is contained in:
@@ -12,24 +12,6 @@ class TagTest < ActiveSupport::TestCase
|
||||
CurrentUser.ip_addr = nil
|
||||
end
|
||||
|
||||
context ".trending" do
|
||||
setup do
|
||||
Tag.stubs(:trending_count_limit).returns(0)
|
||||
|
||||
travel_to(1.week.ago) do
|
||||
FactoryBot.create(:post, :tag_string => "aaa")
|
||||
FactoryBot.create(:post, :tag_string => "bbb")
|
||||
end
|
||||
|
||||
FactoryBot.create(:post, :tag_string => "bbb")
|
||||
FactoryBot.create(:post, :tag_string => "ccc")
|
||||
end
|
||||
|
||||
should "order the results by the total post count" do
|
||||
assert_equal(["ccc", "bbb"], Tag.trending)
|
||||
end
|
||||
end
|
||||
|
||||
context "A tag category fetcher" do
|
||||
should "fetch for a single tag" do
|
||||
FactoryBot.create(:artist_tag, :name => "test")
|
||||
|
||||
Reference in New Issue
Block a user