adds final recounting to poll officers' zone

This commit is contained in:
Juanjo Bazán
2017-01-30 17:44:20 +01:00
parent 4a55840ec9
commit 72ac75abeb
20 changed files with 391 additions and 9 deletions

View File

@@ -415,6 +415,10 @@ FactoryGirl.define do
association :officer, factory: :poll_officer
association :booth_assignment, factory: :poll_booth_assignment
date Time.current.to_date
trait :final do
final true
end
end
factory :poll_recount, class: 'Poll::Recount' do
@@ -424,6 +428,13 @@ FactoryGirl.define do
date (1.month.ago.to_datetime..1.month.from_now.to_datetime).to_a.sample
end
factory :poll_final_recount, class: 'Poll::FinalRecount' do
association :officer_assignment, factory: [:poll_officer_assignment, :final]
association :booth_assignment, factory: :poll_booth_assignment
count (1..100).to_a.sample
date (1.month.ago.to_datetime..1.month.from_now.to_datetime).to_a.sample
end
factory :poll_voter, class: 'Poll::Voter' do
poll
association :user, :level_two