Unify create comments specs

This commit is contained in:
taitus
2023-12-18 23:15:58 +01:00
parent d24c2859c4
commit ed5ba0592c
9 changed files with 33 additions and 126 deletions

View File

@@ -25,19 +25,6 @@ describe "Commenting debates" do
end
end
scenario "Create" do
login_as(user)
visit debate_path(debate)
fill_in "Leave your comment", with: "Have you thought about...?"
click_button "Publish comment"
within "#comments" do
expect(page).to have_content "Have you thought about...?"
expect(page).to have_content "(1)"
end
end
describe "Hide" do
scenario "Without replies" do
create(:comment, commentable: debate, user: user, body: "This was a mistake")