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/relationships.rb

32 lines
1,003 B
Ruby
Raw Normal View History

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
sequence :from_date do |n|
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
factory :federal_secretary_relationship,
2019-09-21 16:23:13 -04:00
parent: :federal_manager_relationship
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