Commit 9f41d6d509e31ff17a2d8081872207b1c8cc59fc
1 parent
8f3d6b31
Exists in
master
and in
29 other branches
Fix content_viewer_helper test
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
test/unit/content_viewer_helper_test.rb
| @@ -69,7 +69,8 @@ class ContentViewerHelperTest < ActiveSupport::TestCase | @@ -69,7 +69,8 @@ class ContentViewerHelperTest < ActiveSupport::TestCase | ||
| 69 | 69 | ||
| 70 | should 'count total of comments from post' do | 70 | should 'count total of comments from post' do |
| 71 | article = fast_create(TextileArticle, :profile_id => profile.id) | 71 | article = fast_create(TextileArticle, :profile_id => profile.id) |
| 72 | - article.comments.create!(:author => profile, :title => 'test', :body => 'test') | 72 | + Comment.create!(:source => article, :author => profile, :title => 'test', :body => 'test') |
| 73 | + article.reload | ||
| 73 | result = link_to_comments(article) | 74 | result = link_to_comments(article) |
| 74 | assert_match /One comment/, result | 75 | assert_match /One comment/, result |
| 75 | end | 76 | end |