diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb index 4344aebf0e1..80f9384172d 100644 --- a/spec/system/comments/budget_investments_spec.rb +++ b/spec/system/comments/budget_investments_spec.rb @@ -68,12 +68,6 @@ end end end - - scenario "can not comment as a moderator", :admin do - visit budget_investment_path(investment.budget, investment) - - expect(page).not_to have_content "Comment as moderator" - end end describe "Voting comments" do diff --git a/spec/system/comments/debates_spec.rb b/spec/system/comments/debates_spec.rb index d56956e6e01..8ee485193b1 100644 --- a/spec/system/comments/debates_spec.rb +++ b/spec/system/comments/debates_spec.rb @@ -125,14 +125,6 @@ expect(page).to have_button "Publish comment", disabled: false end - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - visit debate_path(debate) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } diff --git a/spec/system/comments/legislation_annotations_spec.rb b/spec/system/comments/legislation_annotations_spec.rb index dc185457b4a..8a3180e34a4 100644 --- a/spec/system/comments/legislation_annotations_spec.rb +++ b/spec/system/comments/legislation_annotations_spec.rb @@ -20,14 +20,6 @@ expect(page).to have_button "Publish comment", disabled: false end - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - visit polymorphic_path(annotation) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } diff --git a/spec/system/comments/legislation_questions_spec.rb b/spec/system/comments/legislation_questions_spec.rb index e8245fcf086..182e36659cf 100644 --- a/spec/system/comments/legislation_questions_spec.rb +++ b/spec/system/comments/legislation_questions_spec.rb @@ -22,14 +22,6 @@ expect(page).to have_button "Publish answer", disabled: false end - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - visit legislation_process_question_path(question.process, question) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } diff --git a/spec/system/comments/polls_spec.rb b/spec/system/comments/polls_spec.rb index 1ffefb5ec5c..6a09125cf54 100644 --- a/spec/system/comments/polls_spec.rb +++ b/spec/system/comments/polls_spec.rb @@ -4,14 +4,6 @@ let(:user) { create(:user) } let(:poll) { create(:poll, author: create(:user)) } - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - visit poll_path(poll) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } diff --git a/spec/system/comments/proposals_spec.rb b/spec/system/comments/proposals_spec.rb index 68868c8bf41..0df8f93e1c2 100644 --- a/spec/system/comments/proposals_spec.rb +++ b/spec/system/comments/proposals_spec.rb @@ -5,14 +5,6 @@ it_behaves_like "flaggable", :proposal_comment - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - visit proposal_path(proposal) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } diff --git a/spec/system/comments/topics_spec.rb b/spec/system/comments/topics_spec.rb index 7ad447f9f11..4d16f55fffb 100644 --- a/spec/system/comments/topics_spec.rb +++ b/spec/system/comments/topics_spec.rb @@ -5,17 +5,6 @@ it_behaves_like "flaggable", :topic_with_community_comment - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - community = proposal.community - topic = create(:topic, community: community) - - visit community_topic_path(community, topic) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } @@ -118,17 +107,6 @@ let(:user) { create(:user) } let(:investment) { create(:budget_investment) } - describe "Administrators" do - scenario "can not comment as a moderator", :admin do - community = investment.community - topic = create(:topic, community: community) - - visit community_topic_path(community, topic) - - expect(page).not_to have_content "Comment as moderator" - end - end - describe "Voting comments" do let(:verified) { create(:user, verified_at: Time.current) } let(:unverified) { create(:user) } diff --git a/spec/system/comments_spec.rb b/spec/system/comments_spec.rb index d9e1c90d6f9..e62f4d85c44 100644 --- a/spec/system/comments_spec.rb +++ b/spec/system/comments_spec.rb @@ -494,6 +494,12 @@ expect(page).not_to have_css "#js-comment-form-comment_#{comment.id}" end end + + scenario "can not comment as a moderator", :admin do + visit polymorphic_path(resource) + + expect(page).not_to have_content "Comment as moderator" + end end scenario "Errors on create" do