Tests improvements

This commit is contained in:
María Checa
2017-10-18 13:40:04 +02:00
parent fb1a0904cb
commit 5589c2d8a0

View File

@@ -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")