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.
163 lines
4.2 KiB
163 lines
4.2 KiB
3 years ago
|
FactoryBot.define do
|
||
2 years ago
|
factory :lettings_log do
|
||
3 years ago
|
created_by { FactoryBot.create(:user) }
|
||
2 years ago
|
owning_organisation { created_by.organisation }
|
||
|
managing_organisation { created_by.organisation }
|
||
3 years ago
|
trait :about_completed do
|
||
3 years ago
|
renewal { 0 }
|
||
3 years ago
|
needstype { 1 }
|
||
|
rent_type { 1 }
|
||
3 years ago
|
startdate { Time.zone.local(2022, 5, 1) }
|
||
3 years ago
|
end
|
||
3 years ago
|
trait :in_progress do
|
||
3 years ago
|
status { 1 }
|
||
2 years ago
|
tenancycode { Faker::Name.initials(number: 10) }
|
||
2 years ago
|
postcode_full { Faker::Address.postcode }
|
||
|
ppostcode_full { Faker::Address.postcode }
|
||
3 years ago
|
age1 { 17 }
|
||
3 years ago
|
age2 { 19 }
|
||
2 years ago
|
renewal { 1 }
|
||
|
rent_type { 1 }
|
||
|
startdate { Time.zone.local(2021, 5, 1) }
|
||
3 years ago
|
end
|
||
3 years ago
|
trait :soft_validations_triggered do
|
||
|
status { 1 }
|
||
3 years ago
|
ecstat1 { 1 }
|
||
3 years ago
|
earnings { 750 }
|
||
3 years ago
|
incfreq { 1 }
|
||
3 years ago
|
end
|
||
3 years ago
|
trait :conditional_section_complete do
|
||
2 years ago
|
tenancycode { Faker::Name.initials(number: 10) }
|
||
3 years ago
|
age1 { 34 }
|
||
|
sex1 { "M" }
|
||
|
ethnic { 2 }
|
||
|
national { 4 }
|
||
|
ecstat1 { 2 }
|
||
3 years ago
|
hhmemb { 1 }
|
||
3 years ago
|
end
|
||
3 years ago
|
trait :completed do
|
||
|
status { 2 }
|
||
2 years ago
|
tenancycode { Faker::Name.initials(number: 10) }
|
||
2 years ago
|
age1_known { 0 }
|
||
3 years ago
|
age1 { 35 }
|
||
3 years ago
|
sex1 { "F" }
|
||
2 years ago
|
ethnic_group { 0 }
|
||
3 years ago
|
ethnic { 2 }
|
||
|
national { 4 }
|
||
3 years ago
|
prevten { 6 }
|
||
|
ecstat1 { 0 }
|
||
3 years ago
|
hhmemb { 2 }
|
||
3 years ago
|
relat2 { "P" }
|
||
2 years ago
|
age2_known { 0 }
|
||
|
details_known_2 { 0 }
|
||
3 years ago
|
age2 { 32 }
|
||
3 years ago
|
sex2 { "M" }
|
||
3 years ago
|
ecstat2 { 6 }
|
||
3 years ago
|
homeless { 1 }
|
||
|
underoccupation_benefitcap { 0 }
|
||
|
leftreg { 1 }
|
||
|
reservist { 0 }
|
||
3 years ago
|
illness { 1 }
|
||
|
preg_occ { 2 }
|
||
2 years ago
|
startertenancy { 1 }
|
||
3 years ago
|
tenancylength { 5 }
|
||
3 years ago
|
tenancy { 1 }
|
||
2 years ago
|
ppostcode_full { Faker::Address.postcode }
|
||
3 years ago
|
rsnvac { 6 }
|
||
|
unittype_gn { 7 }
|
||
3 years ago
|
beds { 3 }
|
||
3 years ago
|
voiddate { "03/11/2019" }
|
||
3 years ago
|
offered { 2 }
|
||
3 years ago
|
wchair { 1 }
|
||
3 years ago
|
earnings { 68 }
|
||
3 years ago
|
incfreq { 1 }
|
||
3 years ago
|
benefits { 1 }
|
||
3 years ago
|
period { 2 }
|
||
3 years ago
|
brent { 200 }
|
||
|
scharge { 50 }
|
||
|
pscharge { 40 }
|
||
|
supcharg { 35 }
|
||
|
tcharge { 325 }
|
||
3 years ago
|
layear { 2 }
|
||
3 years ago
|
waityear { 1 }
|
||
2 years ago
|
postcode_known { 1 }
|
||
2 years ago
|
postcode_full { Faker::Address.postcode }
|
||
3 years ago
|
reasonpref { 1 }
|
||
3 years ago
|
cbl { 1 }
|
||
|
chr { 1 }
|
||
|
cap { 0 }
|
||
3 years ago
|
reasonother { nil }
|
||
2 years ago
|
housingneeds { 1 }
|
||
|
housingneeds_type { 0 }
|
||
|
housingneeds_other { 0 }
|
||
3 years ago
|
housingneeds_a { 1 }
|
||
|
housingneeds_b { 0 }
|
||
|
housingneeds_c { 0 }
|
||
|
housingneeds_f { 0 }
|
||
|
housingneeds_g { 0 }
|
||
|
housingneeds_h { 0 }
|
||
|
illness_type_1 { 0 }
|
||
|
illness_type_2 { 1 }
|
||
|
illness_type_3 { 0 }
|
||
|
illness_type_4 { 0 }
|
||
|
illness_type_8 { 0 }
|
||
|
illness_type_5 { 0 }
|
||
|
illness_type_6 { 0 }
|
||
|
illness_type_7 { 0 }
|
||
|
illness_type_9 { 0 }
|
||
|
illness_type_10 { 0 }
|
||
3 years ago
|
rp_homeless { 0 }
|
||
|
rp_insan_unsat { 1 }
|
||
3 years ago
|
rp_medwel { 0 }
|
||
|
rp_hardship { 0 }
|
||
|
rp_dontknow { 0 }
|
||
3 years ago
|
tenancyother { nil }
|
||
3 years ago
|
net_income_value_check { nil }
|
||
2 years ago
|
void_date_value_check { 1 }
|
||
|
major_repairs_date_value_check { 1 }
|
||
2 years ago
|
net_income_known { 0 }
|
||
3 years ago
|
previous_la_known { 1 }
|
||
3 years ago
|
property_owner_organisation { "Test" }
|
||
|
property_manager_organisation { "Test" }
|
||
3 years ago
|
renewal { 0 }
|
||
3 years ago
|
rent_type { 1 }
|
||
3 years ago
|
needstype { 1 }
|
||
3 years ago
|
purchaser_code { 798_794 }
|
||
3 years ago
|
reason { 4 }
|
||
2 years ago
|
propcode { Faker::Name.initials(number: 10) }
|
||
3 years ago
|
majorrepairs { 1 }
|
||
|
la { "E09000003" }
|
||
|
prevloc { "E07000105" }
|
||
3 years ago
|
hb { 6 }
|
||
3 years ago
|
hbrentshortfall { 1 }
|
||
3 years ago
|
tshortfall { 12 }
|
||
3 years ago
|
property_relet { 0 }
|
||
3 years ago
|
mrcdate { Time.utc(2020, 5, 0o5, 10, 36, 49) }
|
||
3 years ago
|
incref { 0 }
|
||
3 years ago
|
sale_completion_date { nil }
|
||
3 years ago
|
startdate { Time.utc(2022, 2, 2, 10, 36, 49) }
|
||
3 years ago
|
armedforces { 1 }
|
||
3 years ago
|
builtype { 1 }
|
||
|
unitletas { 2 }
|
||
3 years ago
|
has_benefits { 1 }
|
||
|
is_carehome { 0 }
|
||
|
declaration { 1 }
|
||
2 years ago
|
first_time_property_let_as_social_housing { 0 }
|
||
|
referral { 2 }
|
||
|
end
|
||
|
trait :export do
|
||
|
tenancycode { "987654" }
|
||
|
ppostcode_full { "LE5 1QP" }
|
||
|
propcode { "MYPROP" }
|
||
|
tenancylength { nil }
|
||
|
end
|
||
|
trait :sh do
|
||
|
needstype { 2 }
|
||
|
sheltered { 0 }
|
||
|
household_charge { 0 }
|
||
3 years ago
|
end
|
||
3 years ago
|
created_at { Time.utc(2022, 2, 8, 16, 52, 15) }
|
||
|
updated_at { Time.utc(2022, 2, 8, 16, 52, 15) }
|
||
3 years ago
|
end
|
||
|
end
|