fix tag test
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div id="c-explore-posts">
|
||||
<div id="a-intro">
|
||||
<header>
|
||||
<h1><%= Danbooru.config.app_name %></h1>
|
||||
<h1><%= link_to Danbooru.config.app_name, posts_path %></h1>
|
||||
<p class="byline">Find good anime art fast</p>
|
||||
|
||||
<%= form_tag(posts_path, :method => :get) do %>
|
||||
|
||||
@@ -17,16 +17,16 @@ class TagTest < ActiveSupport::TestCase
|
||||
context ".trending" do
|
||||
setup do
|
||||
Timecop.travel(1.week.ago) do
|
||||
Post.create(:tag_string => "aaa")
|
||||
Post.create(:tag_string => "bbb")
|
||||
FactoryGirl.create(:post, :tag_string => "aaa")
|
||||
FactoryGirl.create(:post, :tag_string => "bbb")
|
||||
end
|
||||
|
||||
Post.create(:tag_string => "bbb")
|
||||
Post.create(:tag_string => "ccc")
|
||||
FactoryGirl.create(:post, :tag_string => "bbb")
|
||||
FactoryGirl.create(:post, :tag_string => "ccc")
|
||||
end
|
||||
|
||||
should "order the results by the total post count" do
|
||||
assert_equal([], Tag.trending)
|
||||
assert_equal(["ccc", "bbb"], Tag.trending)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user