You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
884 B
26 lines
884 B
FactoryBot.define do |
|
factory :scheme do |
|
service_name { Faker::Name.name } |
|
sensitive { Faker::Number.within(range: 0..1) } |
|
registered_under_care_act { 1 } |
|
support_type { [0, 2, 3, 4, 5].sample } |
|
scheme_type { 0 } |
|
arrangement_type { "D" } |
|
intended_stay { %w[M P S V X].sample } |
|
primary_client_group { %w[O H M L A G F B D E I S N R Q P X].sample } |
|
secondary_client_group { %w[O H M L A G F B D E I S N R Q P X].sample } |
|
owning_organisation { FactoryBot.create(:organisation) } |
|
managing_organisation { FactoryBot.create(:organisation) } |
|
confirmed { true } |
|
created_at { Time.zone.now } |
|
trait :export do |
|
sensitive { 1 } |
|
registered_under_care_act { 1 } |
|
support_type { 4 } |
|
scheme_type { 7 } |
|
intended_stay { "M" } |
|
primary_client_group { "G" } |
|
secondary_client_group { "M" } |
|
end |
|
end |
|
end
|
|
|