diff --git a/spec/system/comments/debates_spec.rb b/spec/system/comments/debates_spec.rb index 8e47ee29b..518465115 100644 --- a/spec/system/comments/debates_spec.rb +++ b/spec/system/comments/debates_spec.rb @@ -6,16 +6,6 @@ describe "Commenting debates" do it_behaves_like "flaggable", :debate_comment - 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 "Submit button is disabled after clicking" do debate = create(:debate) login_as(user) diff --git a/spec/system/comments_spec.rb b/spec/system/comments_spec.rb index 6af0782a1..6fa1c9cbf 100644 --- a/spec/system/comments_spec.rb +++ b/spec/system/comments_spec.rb @@ -497,6 +497,16 @@ describe "Comments" do end end + scenario "Show comment when the author is hidden" do + create(:comment, body: "This is pointless", commentable: resource, author: create(:user, :hidden)) + + visit polymorphic_path(resource) + + within ".comment", text: "This is pointless" do + expect(page).to have_content "User deleted" + end + end + describe "Moderators" do let(:moderator) { create(:moderator) } before { login_as(moderator.user) }