Exclude open-ended questions from managing physical votes
Also make the :yes_no factory trait create a votation_type_unique by default, since yes/no questions should always be unique.
This commit is contained in:
@@ -16,4 +16,13 @@ describe Officing::Results::FormComponent do
|
||||
expect(page).to have_field "Invalid ballots", with: 0, type: :number
|
||||
expect(page).to have_field "Valid ballots", with: 0, type: :number
|
||||
end
|
||||
|
||||
it "does not render open-ended questions" do
|
||||
create(:poll_question_open, poll: poll, title: "What do you want?")
|
||||
|
||||
render_inline Officing::Results::FormComponent.new(poll, Poll::OfficerAssignment.none)
|
||||
|
||||
expect(page).not_to have_content "What do you want?"
|
||||
expect(page).to have_css "fieldset", text: "Agreed?"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user