diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index ae0cb1276..0ea042746 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -2,7 +2,7 @@ <% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author] do %>
<%= t("comments.comment.deleted") %>
diff --git a/spec/system/comments/debates_spec.rb b/spec/system/comments/debates_spec.rb index 706cd8142..57cca11d7 100644 --- a/spec/system/comments/debates_spec.rb +++ b/spec/system/comments/debates_spec.rb @@ -371,6 +371,16 @@ describe "Commenting debates" do end end + scenario "Show comment when the author is hidden" do + create(:comment, body: "This is pointless", commentable: debate, author: create(:user, :hidden)) + + visit debate_path(debate) + + within ".comment", text: "This is pointless" do + expect(page).to have_content "User deleted" + end + end + scenario "Errors on reply" do comment = create(:comment, commentable: debate, user: user)