From 5589c2d8a0f283168cd79814c005b60d3aaf5689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Wed, 18 Oct 2017 13:40:04 +0200 Subject: [PATCH] Tests improvements --- spec/features/officing_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/features/officing_spec.rb b/spec/features/officing_spec.rb index 12d322099..338b416ea 100644 --- a/spec/features/officing_spec.rb +++ b/spec/features/officing_spec.rb @@ -144,8 +144,7 @@ feature 'Poll Officing' do expect(page).to have_content 'Document verified with Census' click_button "Confirm vote" expect(page).to have_content "Vote introduced!" - - expect(Poll::Voter.where(document_number: '12345678Z').count).to be(1) + expect(Poll::Voter.where(document_number: '12345678Z', poll_id: poll, origin: 'booth', officer_id: officer1).count).to be(1) visit final_officing_polls_path page.should have_content("Polls ready for final recounting") @@ -162,8 +161,7 @@ feature 'Poll Officing' do expect(page).to have_content 'Document verified with Census' click_button "Confirm vote" expect(page).to have_content "Vote introduced!" - - expect(Poll::Voter.where(document_number: '12345678Y').count).to be(1) + expect(Poll::Voter.where(document_number: '12345678Y', poll_id: poll, origin: 'booth', officer_id: officer2).count).to be(1) visit final_officing_polls_path page.should have_content("Polls ready for final recounting")