From 9f41d6d509e31ff17a2d8081872207b1c8cc59fc Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 23 Jul 2014 19:31:51 +0000 Subject: [PATCH] Fix content_viewer_helper test --- test/unit/content_viewer_helper_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/content_viewer_helper_test.rb b/test/unit/content_viewer_helper_test.rb index 06c7d3e..5f93fd0 100644 --- a/test/unit/content_viewer_helper_test.rb +++ b/test/unit/content_viewer_helper_test.rb @@ -69,7 +69,8 @@ class ContentViewerHelperTest < ActiveSupport::TestCase should 'count total of comments from post' do article = fast_create(TextileArticle, :profile_id => profile.id) - article.comments.create!(:author => profile, :title => 'test', :body => 'test') + Comment.create!(:source => article, :author => profile, :title => 'test', :body => 'test') + article.reload result = link_to_comments(article) assert_match /One comment/, result end -- libgit2 0.21.2