Commit c03afdf0e7e90c9b4ec8bd0d4fa62c04c413276d
1 parent
8aad796b
Exists in
master
and in
29 other branches
Ignore comment threading for spam
ActionItem2306
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/views/content_viewer/_comment.rhtml
| ... | ... | @@ -82,7 +82,7 @@ |
| 82 | 82 | |
| 83 | 83 | </div> |
| 84 | 84 | |
| 85 | - <% unless comment.replies.blank? %> | |
| 85 | + <% unless comment.replies.blank? || comment.spam? %> | |
| 86 | 86 | <ul class="comment-replies"> |
| 87 | 87 | <% comment.replies.each do |reply| %> |
| 88 | 88 | <%= render :partial => 'comment', :locals => { :comment => reply } %> | ... | ... |
test/functional/spam_controller_test.rb
| ... | ... | @@ -31,5 +31,11 @@ class SpamControllerTest < ActionController::TestCase |
| 31 | 31 | assert !Comment.exists?(@spam.id) |
| 32 | 32 | end |
| 33 | 33 | |
| 34 | + should 'properly render spam that have replies' do | |
| 35 | + reply_spam = fast_create(Comment, :source_id => @article_id, :reply_of_id => @spam.id) | |
| 36 | + | |
| 37 | + get :index, :profile => @profile.identifier | |
| 38 | + assert_response :success | |
| 39 | + end | |
| 34 | 40 | |
| 35 | 41 | end | ... | ... |