diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb index 4344aebf0..80f938417 100644 --- a/spec/system/comments/budget_investments_spec.rb +++ b/spec/system/comments/budget_investments_spec.rb @@ -68,12 +68,6 @@ describe "Commenting Budget::Investments" do 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 d56956e6e..8ee485193 100644 --- a/spec/system/comments/debates_spec.rb +++ b/spec/system/comments/debates_spec.rb @@ -125,14 +125,6 @@ describe "Commenting debates" do 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 dc185457b..8a3180e34 100644 --- a/spec/system/comments/legislation_annotations_spec.rb +++ b/spec/system/comments/legislation_annotations_spec.rb @@ -20,14 +20,6 @@ describe "Commenting legislation questions" do 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 e8245fcf0..182e36659 100644 --- a/spec/system/comments/legislation_questions_spec.rb +++ b/spec/system/comments/legislation_questions_spec.rb @@ -22,14 +22,6 @@ describe "Commenting legislation questions" do 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 1ffefb5ec..6a09125cf 100644 --- a/spec/system/comments/polls_spec.rb +++ b/spec/system/comments/polls_spec.rb @@ -4,14 +4,6 @@ describe "Commenting polls" do 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 68868c8bf..0df8f93e1 100644 --- a/spec/system/comments/proposals_spec.rb +++ b/spec/system/comments/proposals_spec.rb @@ -5,14 +5,6 @@ describe "Commenting proposals" do 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 7ad447f9f..4d16f55ff 100644 --- a/spec/system/comments/topics_spec.rb +++ b/spec/system/comments/topics_spec.rb @@ -5,17 +5,6 @@ describe "Commenting topics from proposals" do 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 @@ describe "Commenting topics from budget investments" do 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 d9e1c90d6..e62f4d85c 100644 --- a/spec/system/comments_spec.rb +++ b/spec/system/comments_spec.rb @@ -494,6 +494,12 @@ describe "Comments" do 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