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:
@@ -239,9 +239,7 @@ describe "Admin booths assignments" do
|
||||
booth_assignment = create(:poll_booth_assignment, poll: poll)
|
||||
other_booth_assignment = create(:poll_booth_assignment, poll: poll)
|
||||
|
||||
question_1 = create(:poll_question, poll: poll)
|
||||
create(:poll_question_answer, title: "Yes", question: question_1)
|
||||
create(:poll_question_answer, title: "No", question: question_1)
|
||||
question_1 = create(:poll_question, :yes_no, poll: poll)
|
||||
|
||||
question_2 = create(:poll_question, poll: poll)
|
||||
create(:poll_question_answer, title: "Today", question: question_2)
|
||||
|
||||
@@ -133,9 +133,7 @@ describe "Admin polls" do
|
||||
|
||||
scenario "Can destroy poll with questions and answers", :js do
|
||||
poll = create(:poll)
|
||||
question = create(:poll_question, poll: poll)
|
||||
create(:poll_question_answer, question: question, title: "Yes")
|
||||
create(:poll_question_answer, question: question, title: "No")
|
||||
question = create(:poll_question, :yes_no, poll: poll)
|
||||
|
||||
visit admin_polls_path
|
||||
|
||||
@@ -438,9 +436,7 @@ describe "Admin polls" do
|
||||
booth_assignment_2 = create(:poll_booth_assignment, poll: poll)
|
||||
booth_assignment_3 = create(:poll_booth_assignment, poll: poll)
|
||||
|
||||
question_1 = create(:poll_question, poll: poll)
|
||||
create(:poll_question_answer, title: "Yes", question: question_1)
|
||||
create(:poll_question_answer, title: "No", question: question_1)
|
||||
question_1 = create(:poll_question, :yes_no, poll: poll)
|
||||
|
||||
question_2 = create(:poll_question, poll: poll)
|
||||
create(:poll_question_answer, title: "Today", question: question_2)
|
||||
@@ -494,9 +490,7 @@ describe "Admin polls" do
|
||||
booth_assignment1 = create(:poll_booth_assignment, poll: poll)
|
||||
booth_assignment2 = create(:poll_booth_assignment, poll: poll)
|
||||
|
||||
question = create(:poll_question, poll: poll)
|
||||
create(:poll_question_answer, title: "Yes", question: question)
|
||||
create(:poll_question_answer, title: "No", question: question)
|
||||
question = create(:poll_question, :yes_no, poll: poll)
|
||||
|
||||
create(:poll_partial_result,
|
||||
booth_assignment: booth_assignment1,
|
||||
|
||||
Reference in New Issue
Block a user