Commit 7750126996d661383f7d03facd2e5ca1ac1a4214

Authored by Rodrigo Souto
1 parent 6afc4db6

[comments-refactor-review] Fixing content viewwer controller test

test/functional/content_viewer_controller_test.rb
@@ -1014,8 +1014,7 @@ class ContentViewerControllerTest < ActionController::TestCase @@ -1014,8 +1014,7 @@ class ContentViewerControllerTest < ActionController::TestCase
1014 profile = create_user('testuser').person 1014 profile = create_user('testuser').person
1015 article = profile.articles.build(:name => 'test') 1015 article = profile.articles.build(:name => 'test')
1016 article.save! 1016 article.save!
1017 - comment = article.comments.build(:author => profile, :title => 'a comment', :body => 'lalala')  
1018 - comment.save! 1017 + comment = Comment.create!(:author => profile, :title => 'a comment', :body => 'lalala', :article => article)
1019 login_as 'testuser' 1018 login_as 'testuser'
1020 get :view_page, :profile => 'testuser', :page => [ 'test' ] 1019 get :view_page, :profile => 'testuser', :page => [ 'test' ]
1021 assert_tag :tag => 'a', :attributes => { :class => /comment-actions-reply/ } 1020 assert_tag :tag => 'a', :attributes => { :class => /comment-actions-reply/ }