Use yes_no trait to simplify creating answers

We lose some variety in our answers, though, but on the plus side, we
reduce the risk of trademark issues :P.
This commit is contained in:
Javi Martín
2019-09-24 21:14:56 +02:00
parent 19a41eb651
commit 4edab79910
4 changed files with 58 additions and 95 deletions

View File

@@ -129,9 +129,7 @@ describe "Polls" do
scenario "Edit poll should allow to remove answers", :js do
poll = create(:poll, related: proposal, starts_at: 1.week.from_now)
question = create(:poll_question, poll: poll)
create(:poll_question_answer, question: question)
create(:poll_question_answer, question: question)
create(:poll_question, :yes_no, poll: poll)
visit proposal_dashboard_polls_path(proposal)
within "div#poll_#{poll.id}" do
click_link "Edit survey"