2019-04-27 10:24:04 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :supporter_relationship, class: Relationship do
|
2019-09-30 22:30:04 -04:00
|
|
|
association :org_unit, factory: :some_children_org_unit
|
2019-09-28 17:21:34 -04:00
|
|
|
association :status, factory: :some_relation_status
|
2019-04-27 10:24:04 -04:00
|
|
|
association :person, factory: :initial_person
|
2019-04-28 08:48:51 -04:00
|
|
|
|
2019-07-20 02:22:47 -04:00
|
|
|
sequence :from_date do |n|
|
2019-06-04 21:37:55 -04:00
|
|
|
Date.new rand((10 * n)...(11 * n)), rand(1..12), rand(1..28)
|
|
|
|
end
|
2019-04-28 08:48:51 -04:00
|
|
|
end
|
|
|
|
|
2019-09-21 16:23:13 -04:00
|
|
|
factory :excluded_relationship, parent: :supporter_relationship
|
2019-07-20 05:12:58 -04:00
|
|
|
|
2019-09-21 16:23:13 -04:00
|
|
|
factory :member_relationship, parent: :supporter_relationship
|
2019-07-20 05:12:58 -04:00
|
|
|
|
2019-09-21 16:23:13 -04:00
|
|
|
factory :federal_manager_relationship, parent: :member_relationship
|
2019-07-25 22:06:01 -04:00
|
|
|
|
2019-09-21 16:23:13 -04:00
|
|
|
factory :federal_supervisor_relationship, parent: :member_relationship
|
2019-07-25 22:09:52 -04:00
|
|
|
|
2019-09-21 16:23:13 -04:00
|
|
|
factory :regional_manager_relationship, parent: :member_relationship
|
2019-07-20 05:12:58 -04:00
|
|
|
|
2019-09-21 16:23:13 -04:00
|
|
|
factory :regional_supervisor_relationship, parent: :member_relationship
|
2019-07-25 23:22:12 -04:00
|
|
|
|
|
|
|
factory :federal_secretary_relationship,
|
2019-09-21 16:23:13 -04:00
|
|
|
parent: :federal_manager_relationship
|
2019-07-25 23:40:06 -04:00
|
|
|
|
|
|
|
factory :regional_secretary_relationship,
|
2019-09-21 16:23:13 -04:00
|
|
|
parent: :regional_manager_relationship
|
2019-04-27 10:24:04 -04:00
|
|
|
end
|