Unify can not comment as a moderator specs

This commit is contained in:
taitus
2023-12-19 23:11:34 +01:00
parent ac740f3657
commit 79d00e7b92
8 changed files with 6 additions and 68 deletions

View File

@@ -68,12 +68,6 @@ describe "Commenting Budget::Investments" do
end end
end 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 end
describe "Voting comments" do describe "Voting comments" do

View File

@@ -125,14 +125,6 @@ describe "Commenting debates" do
expect(page).to have_button "Publish comment", disabled: false expect(page).to have_button "Publish comment", disabled: false
end 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }

View File

@@ -20,14 +20,6 @@ describe "Commenting legislation questions" do
expect(page).to have_button "Publish comment", disabled: false expect(page).to have_button "Publish comment", disabled: false
end 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }

View File

@@ -22,14 +22,6 @@ describe "Commenting legislation questions" do
expect(page).to have_button "Publish answer", disabled: false expect(page).to have_button "Publish answer", disabled: false
end 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }

View File

@@ -4,14 +4,6 @@ describe "Commenting polls" do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:poll) { create(:poll, author: 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }

View File

@@ -5,14 +5,6 @@ describe "Commenting proposals" do
it_behaves_like "flaggable", :proposal_comment 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }

View File

@@ -5,17 +5,6 @@ describe "Commenting topics from proposals" do
it_behaves_like "flaggable", :topic_with_community_comment 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }
@@ -118,17 +107,6 @@ describe "Commenting topics from budget investments" do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:investment) { create(:budget_investment) } 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 describe "Voting comments" do
let(:verified) { create(:user, verified_at: Time.current) } let(:verified) { create(:user, verified_at: Time.current) }
let(:unverified) { create(:user) } let(:unverified) { create(:user) }

View File

@@ -494,6 +494,12 @@ describe "Comments" do
expect(page).not_to have_css "#js-comment-form-comment_#{comment.id}" expect(page).not_to have_css "#js-comment-form-comment_#{comment.id}"
end end
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 end
scenario "Errors on create" do scenario "Errors on create" do