Check officer value for Poll Voter created from officing panel

This commit is contained in:
Bertocq
2017-10-04 01:08:33 +02:00
parent e928eb38ac
commit 85087b0bea
2 changed files with 3 additions and 0 deletions

View File

@@ -26,6 +26,8 @@ feature 'Voters' do
page.evaluate_script("window.location.reload()")
expect(page).to have_content "Has already participated in this poll"
expect(page).to_not have_button "Confirm vote"
expect(Poll::Voter.last.officer_id).to eq(officer.id)
end
scenario "Already voted", :js do

View File

@@ -51,6 +51,7 @@ describe Poll::Answer do
expect(voter.document_number).to eq(answer.author.document_number)
expect(voter.poll_id).to eq(answer.poll.id)
expect(voter.officer_id).to eq(nil)
end
it "updates a poll_voter with user and poll data" do