diff --git a/app/views/comments/partials/index/_list.html.erb b/app/views/comments/partials/index/_list.html.erb
index 21f3c4690..58c37d7c4 100644
--- a/app/views/comments/partials/index/_list.html.erb
+++ b/app/views/comments/partials/index/_list.html.erb
@@ -6,7 +6,7 @@
<% if post.comments.hidden(CurrentUser.user).any? || (page == :comments && post.comments.size > 6) %>
<% end %>
diff --git a/test/functional/comments_controller_test.rb b/test/functional/comments_controller_test.rb
index 59badcecd..72e79f2e6 100644
--- a/test/functional/comments_controller_test.rb
+++ b/test/functional/comments_controller_test.rb
@@ -35,18 +35,18 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
assert_select "#post_#{@post.id} #show-all-comments-link", 0
end
- should "show the 'Show all comments' link on posts with thresholded comments" do
+ should "show the 'Show hidden comments' link on posts with thresholded comments" do
as(@user) { create(:comment, post: @post, score: -10) }
get comments_path(group_by: "post")
assert_response :success
assert_select "#post_#{@post.id}", 1
- assert_select "#post_#{@post.id} #show-all-comments-link", 1
+ assert_select "#post_#{@post.id} #show-all-comments-link", /Show 1 hidden comment/
assert_select "#post_#{@post.id} .comment", 0
assert_select "#post_#{@post.id} .list-of-comments", /There are no visible comments/
end
- should "not show the 'Show all comments' link on posts with deleted comments to Members" do
+ should "not show the 'Show hidden comments' link on posts with deleted comments to Members" do
@comment1 = as(@user) { create(:comment, post: @post) }
@comment2 = as(@user) { create(:comment, post: @post, is_deleted: true) }
get comments_path(group_by: "post")
@@ -57,7 +57,7 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
assert_select "#post_#{@post.id} #show-all-comments-link", 0
end
- should "show the 'Show all comments' link on posts with deleted comments to Moderators" do
+ should "show the 'Show hidden comments' link on posts with deleted comments to Moderators" do
@comment1 = as(@user) { create(:comment, post: @post) }
@comment2 = as(@user) { create(:comment, post: @post, is_deleted: true) }
get_auth comments_path(group_by: "post"), @mod
@@ -65,7 +65,7 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
assert_response :success
assert_select "#post_#{@post.id}", 1
assert_select "#post_#{@post.id} .comment", 1
- assert_select "#post_#{@post.id} #show-all-comments-link", 1
+ assert_select "#post_#{@post.id} #show-all-comments-link", /Show 1 hidden comment/
end
should "not bump posts with nonbumping comments" do