comments: fix modreport notices being visible to Members.

Fix the "This comment has been reported" notice being visible for
Members.
This commit is contained in:
evazion
2021-01-19 06:05:51 -06:00
parent 40bf74220c
commit 027359a2c1
3 changed files with 7 additions and 2 deletions

View File

@@ -58,7 +58,8 @@ class CommentComponentTest < ViewComponent::TestCase
end
should "not show the report notice to regular users" do
render_comment(@comment, current_user: User.anonymous)
create(:moderation_report, model: @comment)
render_comment(@comment, current_user: create(:user))
assert_no_css(".moderation-report-notice")
end