Unify not logged user comments specs
Since commit de1bfd44 'Write a comment' text is deleted.
We are changing this text for the current text 'Leave your comment'
or 'Leave your answer'
This commit is contained in:
@@ -204,19 +204,6 @@ describe "Commenting Budget::Investments" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
create(:comment, commentable: investment)
|
||||
visit budget_investment_path(investment.budget, investment)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
login_as(user)
|
||||
visit budget_investment_path(investment.budget, investment)
|
||||
|
||||
@@ -207,19 +207,6 @@ describe "Commenting debates" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
create(:comment, commentable: debate)
|
||||
visit debate_path(debate)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
login_as(user)
|
||||
visit debate_path(debate)
|
||||
|
||||
@@ -201,19 +201,6 @@ describe "Commenting legislation questions" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
create(:comment, commentable: annotation)
|
||||
visit polymorphic_path(annotation)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
login_as(user)
|
||||
visit polymorphic_path(annotation)
|
||||
|
||||
@@ -196,19 +196,6 @@ describe "Commenting legislation questions" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
create(:comment, commentable: question)
|
||||
visit legislation_process_question_path(question.process, question)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
login_as(user)
|
||||
visit legislation_process_question_path(question.process, question)
|
||||
|
||||
@@ -185,19 +185,6 @@ describe "Commenting polls" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
create(:comment, commentable: poll)
|
||||
visit poll_path(poll)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
login_as(user)
|
||||
visit poll_path(poll)
|
||||
|
||||
@@ -190,19 +190,6 @@ describe "Commenting proposals" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
create(:comment, commentable: proposal)
|
||||
visit proposal_path(proposal)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
login_as(user)
|
||||
visit proposal_path(proposal)
|
||||
|
||||
@@ -202,22 +202,6 @@ describe "Commenting topics from proposals" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
community = proposal.community
|
||||
topic = create(:topic, community: community)
|
||||
create(:comment, commentable: topic)
|
||||
|
||||
visit community_topic_path(community, topic)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
community = proposal.community
|
||||
topic = create(:topic, community: community)
|
||||
@@ -751,22 +735,6 @@ describe "Commenting topics from budget investments" do
|
||||
expect(page).to have_current_path(/#comments/, url: true)
|
||||
end
|
||||
|
||||
describe "Not logged user" do
|
||||
scenario "can not see comments forms" do
|
||||
community = investment.community
|
||||
topic = create(:topic, community: community)
|
||||
create(:comment, commentable: topic)
|
||||
|
||||
visit community_topic_path(community, topic)
|
||||
|
||||
expect(page).to have_content "You must sign in or sign up to leave a comment"
|
||||
within("#comments") do
|
||||
expect(page).not_to have_content "Write a comment"
|
||||
expect(page).not_to have_content "Reply"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Create" do
|
||||
community = investment.community
|
||||
topic = create(:topic, community: community)
|
||||
|
||||
Reference in New Issue
Block a user