diff --git a/spec/features/officing/voters_spec.rb b/spec/features/officing/voters_spec.rb index 0a23a6a27..b4127b5b8 100644 --- a/spec/features/officing/voters_spec.rb +++ b/spec/features/officing/voters_spec.rb @@ -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 diff --git a/spec/models/poll/answer_spec.rb b/spec/models/poll/answer_spec.rb index d66cdc18c..d245af8d4 100644 --- a/spec/models/poll/answer_spec.rb +++ b/spec/models/poll/answer_spec.rb @@ -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