From 77843119aad7c571bf101ba40b033c52e28f540e Mon Sep 17 00:00:00 2001 From: r888888888 Date: Sun, 30 Jun 2013 22:51:47 -0700 Subject: [PATCH] fix tag test --- app/views/explore/posts/intro.html.erb | 2 +- test/unit/tag_test.rb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/explore/posts/intro.html.erb b/app/views/explore/posts/intro.html.erb index eb7747cc5..a77f0a25e 100644 --- a/app/views/explore/posts/intro.html.erb +++ b/app/views/explore/posts/intro.html.erb @@ -1,7 +1,7 @@
-

<%= Danbooru.config.app_name %>

+

<%= link_to Danbooru.config.app_name, posts_path %>

<%= form_tag(posts_path, :method => :get) do %> diff --git a/test/unit/tag_test.rb b/test/unit/tag_test.rb index c595d20ae..9e82f8288 100644 --- a/test/unit/tag_test.rb +++ b/test/unit/tag_test.rb @@ -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