Fix #3351: Mod+: Treat deleted comments as below score threshold.
Comments have three states: visible, hidden, and invisible. Visible comments are always shown. Hidden comments are not shown until the user clicks 'Show all comments'. Invisible comments are never shown to the user. Deleted comments are treated as hidden for moderators and invisible for normal users. Thresholded comments are treated as hidden for all users.
This commit is contained in:
@@ -157,12 +157,14 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_select "div.list-of-comments p", /There are no comments/
|
||||
end
|
||||
|
||||
should "show deleted comments to moderators" do
|
||||
should "not show deleted comments to moderators by default, but allow them to be unhidden" do
|
||||
mod = create(:mod_user)
|
||||
get_auth post_path(@post), mod, params: { id: @post.id }
|
||||
|
||||
assert_response :success
|
||||
assert_select "article.comment", 1
|
||||
assert_select "article.comment", 0
|
||||
assert_select "a#show-all-comments-link", 1
|
||||
assert_select "div.list-of-comments p", /There are no comments/
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user