1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/factories/people.rb

18 lines
574 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :initial_person, class: Person do
association :contacts_list, factory: :empty_contacts_list
first_name { Faker::Name.first_name }
middle_name { Faker::Name.first_name }
last_name { Faker::Name.last_name }
sex { Person.sexes.keys.sample }
date_of_birth { Faker::Date.backward }
place_of_birth { Faker::Address.city }
end
factory :supporter_person, parent: :initial_person
factory :member_person, parent: :supporter_person
factory :excluded_person, parent: :member_person
end