From 7750126996d661383f7d03facd2e5ca1ac1a4214 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Fri, 12 Jul 2013 20:53:35 -0300 Subject: [PATCH] [comments-refactor-review] Fixing content viewwer controller test --- test/functional/content_viewer_controller_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 4ff7c30..c269993 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -1014,8 +1014,7 @@ class ContentViewerControllerTest < ActionController::TestCase profile = create_user('testuser').person article = profile.articles.build(:name => 'test') article.save! - comment = article.comments.build(:author => profile, :title => 'a comment', :body => 'lalala') - comment.save! + comment = Comment.create!(:author => profile, :title => 'a comment', :body => 'lalala', :article => article) login_as 'testuser' get :view_page, :profile => 'testuser', :page => [ 'test' ] assert_tag :tag => 'a', :attributes => { :class => /comment-actions-reply/ } -- libgit2 0.21.2