Commit 7750126996d661383f7d03facd2e5ca1ac1a4214
1 parent
6afc4db6
Exists in
master
and in
28 other branches
[comments-refactor-review] Fixing content viewwer controller test
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
test/functional/content_viewer_controller_test.rb
... | ... | @@ -1014,8 +1014,7 @@ class ContentViewerControllerTest < ActionController::TestCase |
1014 | 1014 | profile = create_user('testuser').person |
1015 | 1015 | article = profile.articles.build(:name => 'test') |
1016 | 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 | 1018 | login_as 'testuser' |
1020 | 1019 | get :view_page, :profile => 'testuser', :page => [ 'test' ] |
1021 | 1020 | assert_tag :tag => 'a', :attributes => { :class => /comment-actions-reply/ } | ... | ... |