Browse Source

CLDC-2375 Remove soft validations from setup (#1645)

* Remove soft validations from sales setup and make them mandatory

* Remove soft validations from lettings setup and make them mandatory

* Fix remaining tests

* Add card numbers to pregnancy checks
pull/1655/head v0.3.23
kosiakkatrina 2 years ago committed by GitHub
parent
commit
22b9ede0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_lead_age_value_check.rb
  2. 4
      app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check.rb
  3. 2
      app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_lead_value_check.rb
  4. 3
      app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check.rb
  5. 3
      app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check.rb
  6. 2
      app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_value_check.rb
  7. 4
      app/models/form/lettings/pages/no_females_pregnant_household_lead_age_value_check.rb
  8. 2
      app/models/form/lettings/pages/no_females_pregnant_household_lead_hhmemb_value_check.rb
  9. 2
      app/models/form/lettings/pages/no_females_pregnant_household_lead_value_check.rb
  10. 3
      app/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check.rb
  11. 3
      app/models/form/lettings/pages/no_females_pregnant_household_person_value_check.rb
  12. 2
      app/models/form/lettings/pages/no_females_pregnant_household_value_check.rb
  13. 6
      app/models/form/lettings/questions/pregnancy_value_check.rb
  14. 8
      app/models/form/lettings/subsections/setup.rb
  15. 6
      app/models/form/sales/subsections/setup.rb
  16. 2
      app/models/lettings_log.rb
  17. 2
      app/models/sales_log.rb
  18. 4
      spec/fixtures/files/lettings_logs_download.csv
  19. 4
      spec/fixtures/files/lettings_logs_download_codes_only.csv
  20. 16
      spec/models/form/lettings/subsections/setup_spec.rb
  21. 6
      spec/models/form/sales/subsections/setup_spec.rb
  22. 4
      spec/models/form_spec.rb
  23. 2
      spec/models/lettings_log_spec.rb
  24. 10
      spec/models/sales_log_spec.rb
  25. 2
      spec/services/csv/lettings_log_csv_service_spec.rb

4
app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_lead_age_value_check.rb

@ -1,6 +1,6 @@
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadAgeValueCheck < ::Form::Page class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadAgeValueCheck < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super(id, hsh, subsection)
@id = "females_in_soft_age_range_in_pregnant_household_lead_age_value_check" @id = "females_in_soft_age_range_in_pregnant_household_lead_age_value_check"
@depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }] @depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }]
@title_text = { @title_text = {
@ -14,7 +14,7 @@ class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadAgeValu
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 1)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

4
app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check.rb

@ -1,6 +1,6 @@
class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadHhmembValueCheck < ::Form::Page class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadHhmembValueCheck < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super(id, hsh, subsection)
@id = "females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check" @id = "females_in_soft_age_range_in_pregnant_household_lead_hhmemb_value_check"
@depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }] @depends_on = [{ "female_in_pregnant_household_in_soft_validation_range?" => true }]
@title_text = { @title_text = {
@ -14,7 +14,7 @@ class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadHhmembV
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 0)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

2
app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_lead_value_check.rb

@ -14,7 +14,7 @@ class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadValueCh
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 1)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

3
app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check.rb

@ -28,10 +28,11 @@ class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonAgeVa
}, },
], ],
} }
@person_index = person_index
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: @person_index)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

3
app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check.rb

@ -28,10 +28,11 @@ class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValue
}, },
], ],
} }
@person_index = person_index
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: @person_index)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

2
app/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_value_check.rb

@ -14,7 +14,7 @@ class Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdValueCheck
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: nil)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

4
app/models/form/lettings/pages/no_females_pregnant_household_lead_age_value_check.rb

@ -1,6 +1,6 @@
class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadAgeValueCheck < ::Form::Page class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadAgeValueCheck < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super(id, hsh, subsection)
@id = "no_females_pregnant_household_lead_age_value_check" @id = "no_females_pregnant_household_lead_age_value_check"
@depends_on = [{ "no_females_in_a_pregnant_household?" => true }] @depends_on = [{ "no_females_in_a_pregnant_household?" => true }]
@title_text = { @title_text = {
@ -14,7 +14,7 @@ class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadAgeValueCheck < ::For
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 1)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

2
app/models/form/lettings/pages/no_females_pregnant_household_lead_hhmemb_value_check.rb

@ -14,7 +14,7 @@ class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadHhmembValueCheck < ::
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 0)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

2
app/models/form/lettings/pages/no_females_pregnant_household_lead_value_check.rb

@ -14,7 +14,7 @@ class Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadValueCheck < ::Form::
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 1)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

3
app/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check.rb

@ -11,10 +11,11 @@ class Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck < ::F
"translation" => "soft_validations.pregnancy.no_females", "translation" => "soft_validations.pregnancy.no_females",
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], "arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }],
} }
@person_index = person_index
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: @person_index)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

3
app/models/form/lettings/pages/no_females_pregnant_household_person_value_check.rb

@ -11,10 +11,11 @@ class Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck < ::Form
"translation" => "soft_validations.pregnancy.no_females", "translation" => "soft_validations.pregnancy.no_females",
"arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }], "arguments" => [{ "key" => "sex1", "label" => true, "i18n_template" => "sex1" }],
} }
@person_index = person_index
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: @person_index)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

2
app/models/form/lettings/pages/no_females_pregnant_household_value_check.rb

@ -14,7 +14,7 @@ class Form::Lettings::Pages::NoFemalesPregnantHouseholdValueCheck < ::Form::Page
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::PregnancyValueCheck.new(nil, nil, self, person_index: 0)]
end end
def interruption_screen_question_ids def interruption_screen_question_ids

6
app/models/form/lettings/questions/pregnancy_value_check.rb

@ -1,11 +1,11 @@
class Form::Lettings::Questions::PregnancyValueCheck < ::Form::Question class Form::Lettings::Questions::PregnancyValueCheck < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page, person_index:)
super super(id, hsh, page)
@id = "pregnancy_value_check" @id = "pregnancy_value_check"
@check_answer_label = "Pregnancy confirmation" @check_answer_label = "Pregnancy confirmation"
@header = "Are you sure this is correct?" @header = "Are you sure this is correct?"
@type = "interruption_screen" @type = "interruption_screen"
@check_answers_card_number = 0 @check_answers_card_number = person_index
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = { "depends_on" => [{ "pregnancy_value_check" => 0 }, { "pregnancy_value_check" => 1 }] } @hidden_in_check_answers = { "depends_on" => [{ "pregnancy_value_check" => 0 }, { "pregnancy_value_check" => 1 }] }
end end

8
app/models/form/lettings/subsections/setup.rb

@ -9,22 +9,14 @@ class Form::Lettings::Subsections::Setup < ::Form::Subsection
def pages def pages
@pages ||= [ @pages ||= [
Form::Lettings::Pages::StockOwner.new(nil, nil, self), Form::Lettings::Pages::StockOwner.new(nil, nil, self),
Form::Lettings::Pages::MinRentValueCheck.new("stock_owner_min_rent_value_check", nil, self),
Form::Lettings::Pages::MaxRentValueCheck.new("stock_owner_max_rent_value_check", nil, self),
Form::Lettings::Pages::ManagingOrganisation.new(nil, nil, self), Form::Lettings::Pages::ManagingOrganisation.new(nil, nil, self),
Form::Lettings::Pages::CreatedBy.new(nil, nil, self), Form::Lettings::Pages::CreatedBy.new(nil, nil, self),
Form::Lettings::Pages::NeedsType.new(nil, nil, self), Form::Lettings::Pages::NeedsType.new(nil, nil, self),
Form::Lettings::Pages::Scheme.new(nil, nil, self), Form::Lettings::Pages::Scheme.new(nil, nil, self),
Form::Lettings::Pages::Location.new(nil, nil, self), Form::Lettings::Pages::Location.new(nil, nil, self),
Form::Lettings::Pages::MinRentValueCheck.new("needs_type_min_rent_value_check", nil, self),
Form::Lettings::Pages::MaxRentValueCheck.new("needs_type_max_rent_value_check", nil, self),
Form::Lettings::Pages::Renewal.new(nil, nil, self), Form::Lettings::Pages::Renewal.new(nil, nil, self),
Form::Lettings::Pages::TenancyStartDate.new(nil, nil, self), Form::Lettings::Pages::TenancyStartDate.new(nil, nil, self),
Form::Lettings::Pages::MinRentValueCheck.new("start_date_min_rent_value_check", nil, self),
Form::Lettings::Pages::MaxRentValueCheck.new("start_date_max_rent_value_check", nil, self),
Form::Lettings::Pages::RentType.new(nil, nil, self), Form::Lettings::Pages::RentType.new(nil, nil, self),
Form::Lettings::Pages::MinRentValueCheck.new("rent_type_min_rent_value_check", nil, self),
Form::Lettings::Pages::MaxRentValueCheck.new("rent_type_max_rent_value_check", nil, self),
Form::Lettings::Pages::TenantCode.new(nil, nil, self), Form::Lettings::Pages::TenantCode.new(nil, nil, self),
Form::Lettings::Pages::PropertyReference.new(nil, nil, self), Form::Lettings::Pages::PropertyReference.new(nil, nil, self),
].compact ].compact

6
app/models/form/sales/subsections/setup.rb

@ -10,17 +10,11 @@ class Form::Sales::Subsections::Setup < ::Form::Subsection
Form::Common::Pages::Organisation.new(nil, nil, self), Form::Common::Pages::Organisation.new(nil, nil, self),
Form::Sales::Pages::CreatedBy.new(nil, nil, self), Form::Sales::Pages::CreatedBy.new(nil, nil, self),
Form::Sales::Pages::SaleDate.new(nil, nil, self), Form::Sales::Pages::SaleDate.new(nil, nil, self),
Form::Sales::Pages::SaleDateCheck.new(nil, nil, self),
Form::Sales::Pages::PurchaserCode.new(nil, nil, self), Form::Sales::Pages::PurchaserCode.new(nil, nil, self),
Form::Sales::Pages::OwnershipScheme.new(nil, nil, self), Form::Sales::Pages::OwnershipScheme.new(nil, nil, self),
Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self), Form::Sales::Pages::SharedOwnershipType.new(nil, nil, self),
Form::Sales::Pages::DiscountedOwnershipType.new(nil, nil, self), Form::Sales::Pages::DiscountedOwnershipType.new(nil, nil, self),
Form::Sales::Pages::OutrightOwnershipType.new(nil, nil, self), Form::Sales::Pages::OutrightOwnershipType.new(nil, nil, self),
Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("ownership_type_old_persons_shared_ownership_value_check", nil, self),
Form::Sales::Pages::MonthlyChargesValueCheck.new("monthly_charges_type_value_check", nil, self),
Form::Sales::Pages::DiscountedSaleValueCheck.new("discounted_sale_type_value_check", nil, self),
Form::Sales::Pages::BuyerLiveInValueCheck.new("buyer_1_live_in_property_type_value_check", nil, self, person_index: 1),
Form::Sales::Pages::BuyerLiveInValueCheck.new("buyer_2_live_in_property_type_value_check", nil, self, person_index: 2),
Form::Sales::Pages::BuyerCompany.new(nil, nil, self), Form::Sales::Pages::BuyerCompany.new(nil, nil, self),
Form::Sales::Pages::BuyerLive.new(nil, nil, self), Form::Sales::Pages::BuyerLive.new(nil, nil, self),
Form::Sales::Pages::JointPurchase.new(nil, nil, self), Form::Sales::Pages::JointPurchase.new(nil, nil, self),

2
app/models/lettings_log.rb

@ -55,7 +55,7 @@ class LettingsLog < Log
scope :filter_by_organisation, ->(org, _user = nil) { where(owning_organisation: org).or(where(managing_organisation: org)) } scope :filter_by_organisation, ->(org, _user = nil) { where(owning_organisation: org).or(where(managing_organisation: org)) }
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze
OPTIONAL_FIELDS = %w[rent_value_check first_time_property_let_as_social_housing tenancycode propcode chcharge].freeze OPTIONAL_FIELDS = %w[first_time_property_let_as_social_housing tenancycode propcode chcharge].freeze
RENT_TYPE_MAPPING_LABELS = { 1 => "Social Rent", 2 => "Affordable Rent", 3 => "Intermediate Rent" }.freeze RENT_TYPE_MAPPING_LABELS = { 1 => "Social Rent", 2 => "Affordable Rent", 3 => "Intermediate Rent" }.freeze
HAS_BENEFITS_OPTIONS = [1, 6, 8, 7].freeze HAS_BENEFITS_OPTIONS = [1, 6, 8, 7].freeze
NUM_OF_WEEKS_FROM_PERIOD = { 2 => 26, 3 => 13, 4 => 12, 5 => 50, 6 => 49, 7 => 48, 8 => 47, 9 => 46, 1 => 52, 10 => 53 }.freeze NUM_OF_WEEKS_FROM_PERIOD = { 2 => 26, 3 => 13, 4 => 12, 5 => 50, 6 => 49, 7 => 48, 8 => 47, 9 => 46, 1 => 52, 10 => 53 }.freeze

2
app/models/sales_log.rb

@ -42,7 +42,7 @@ class SalesLog < Log
} }
scope :filter_by_organisation, ->(org, _user = nil) { where(owning_organisation: org) } scope :filter_by_organisation, ->(org, _user = nil) { where(owning_organisation: org) }
OPTIONAL_FIELDS = %w[saledate_check purchid monthly_charges_value_check old_persons_shared_ownership_value_check othtype discounted_sale_value_check buyer_livein_value_check].freeze OPTIONAL_FIELDS = %w[purchid othtype].freeze
RETIREMENT_AGES = { "M" => 65, "F" => 60, "X" => 65 }.freeze RETIREMENT_AGES = { "M" => 65, "F" => 60, "X" => 65 }.freeze
def lettings? def lettings?

4
spec/fixtures/files/lettings_logs_download.csv vendored

@ -1,2 +1,2 @@
id,status,created_at,updated_at,created_by_name,is_dpo,owning_organisation_name,managing_organisation_name,collection_start_year,rent_value_check,needstype,renewal,startdate,rent_type_detail,irproduct_other,tenancycode,propcode,age1,sex1,ecstat1,hhmemb,relat2,age2,sex2,retirement_value_check,ecstat2,armedforces,leftreg,illness,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_h,is_previous_la_inferred,prevloc_label,prevloc,illness_type_1,illness_type_2,is_la_inferred,la_label,la,postcode_known,postcode_full,previous_la_known,wchair,preg_occ,cbl,earnings,incfreq,net_income_value_check,benefits,hb,period,brent,scharge,pscharge,supcharg,tcharge,offered,layear,ppostcode_full,mrcdate,declaration,ethnic,national,prevten,age3,sex3,ecstat3,age4,sex4,ecstat4,age5,sex5,ecstat5,age6,sex6,ecstat6,age7,sex7,ecstat7,age8,sex8,ecstat8,homeless,underoccupation_benefitcap,reservist,startertenancy,tenancylength,tenancy,rsnvac,unittype_gn,beds,waityear,reasonpref,chr,cap,reasonother,housingneeds_f,housingneeds_g,illness_type_3,illness_type_4,illness_type_8,illness_type_5,illness_type_6,illness_type_7,illness_type_9,illness_type_10,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,tenancyother,property_owner_organisation,property_manager_organisation,purchaser_code,reason,majorrepairs,hbrentshortfall,property_relet,incref,first_time_property_let_as_social_housing,unitletas,builtype,voiddate,renttype,lettype,totchild,totelder,totadult,net_income_known,nocharge,is_carehome,household_charge,referral,tshortfall,chcharge,ppcodenk,age1_known,age2_known,age3_known,age4_known,age5_known,age6_known,age7_known,age8_known,ethnic_group,letting_allocation_unknown,details_known_2,details_known_3,details_known_4,details_known_5,details_known_6,details_known_7,details_known_8,has_benefits,wrent,wscharge,wpschrge,wsupchrg,wtcharge,wtshortfall,refused,housingneeds,wchchrg,newprop,relat3,relat4,relat5,relat6,relat7,relat8,old_form_id,lar,irproduct,old_id,joint,tshortfall_known,sheltered,pregnancy_value_check,hhtype,new_old,vacdays,major_repairs_date_value_check,void_date_value_check,housingneeds_type,housingneeds_other,unresolved,updated_by_id,uprn,uprn_known,uprn_confirmed,address_line1,address_line2,town_or_city,county,carehome_charges_value_check,status_cache,discarded_at,unittype_sh,scheme_code,scheme_service_name,scheme_sensitive,scheme_type,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_admin_district,location_startdate id,status,created_at,updated_at,created_by_name,is_dpo,owning_organisation_name,managing_organisation_name,collection_start_year,needstype,renewal,startdate,rent_type_detail,irproduct_other,tenancycode,propcode,age1,sex1,ecstat1,hhmemb,relat2,age2,sex2,retirement_value_check,ecstat2,armedforces,leftreg,illness,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_h,is_previous_la_inferred,prevloc_label,prevloc,illness_type_1,illness_type_2,is_la_inferred,la_label,la,postcode_known,postcode_full,previous_la_known,wchair,preg_occ,cbl,earnings,incfreq,net_income_value_check,benefits,hb,period,brent,scharge,pscharge,supcharg,tcharge,offered,layear,ppostcode_full,mrcdate,declaration,ethnic,national,prevten,age3,sex3,ecstat3,age4,sex4,ecstat4,age5,sex5,ecstat5,age6,sex6,ecstat6,age7,sex7,ecstat7,age8,sex8,ecstat8,homeless,underoccupation_benefitcap,reservist,startertenancy,tenancylength,tenancy,rsnvac,unittype_gn,beds,waityear,reasonpref,chr,cap,reasonother,housingneeds_f,housingneeds_g,illness_type_3,illness_type_4,illness_type_8,illness_type_5,illness_type_6,illness_type_7,illness_type_9,illness_type_10,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,tenancyother,property_owner_organisation,property_manager_organisation,purchaser_code,reason,majorrepairs,hbrentshortfall,property_relet,incref,first_time_property_let_as_social_housing,unitletas,builtype,voiddate,renttype,lettype,totchild,totelder,totadult,net_income_known,nocharge,is_carehome,household_charge,referral,tshortfall,chcharge,ppcodenk,age1_known,age2_known,age3_known,age4_known,age5_known,age6_known,age7_known,age8_known,ethnic_group,letting_allocation_unknown,details_known_2,details_known_3,details_known_4,details_known_5,details_known_6,details_known_7,details_known_8,has_benefits,wrent,wscharge,wpschrge,wsupchrg,wtcharge,wtshortfall,refused,housingneeds,wchchrg,newprop,relat3,relat4,relat5,relat6,relat7,relat8,rent_value_check,old_form_id,lar,irproduct,old_id,joint,tshortfall_known,sheltered,pregnancy_value_check,hhtype,new_old,vacdays,major_repairs_date_value_check,void_date_value_check,housingneeds_type,housingneeds_other,unresolved,updated_by_id,uprn,uprn_known,uprn_confirmed,address_line1,address_line2,town_or_city,county,carehome_charges_value_check,status_cache,discarded_at,unittype_sh,scheme_code,scheme_service_name,scheme_sensitive,scheme_type,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_admin_district,location_startdate
{id},in_progress,2022-02-08 16:52:15 +0000,2022-02-08 16:52:15 +0000,Danny Rojas,No,DLUHC,DLUHC,2021,,Supported housing,,2 October 2021,London Affordable Rent,,,,,,,,,,,,,,,,,,,,No,,,,,No,Westminster,E09000033,,SE1 1TE,,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,8,0,0,0,,0,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,0,,,,,,,,,,,,,,,,,,9,1,,,,,,,,,,,,,,,,not_started,,6,{scheme_code},{scheme_service_name},{scheme_sensitive},Missing,No,DLUHC,{scheme_primary_client_group},,{scheme_secondary_client_group},{scheme_support_type},{scheme_intended_stay},2021-04-01 00:00:00 +0100,{location_code},SE1 1TE,Downing Street,20,Bungalow,Fitted with equipment and adaptations,Westminster,{location_startdate} {id},in_progress,2022-02-08 16:52:15 +0000,2022-02-08 16:52:15 +0000,Danny Rojas,No,DLUHC,DLUHC,2021,Supported housing,,2 October 2021,London Affordable Rent,,,,,,,,,,,,,,,,,,,,No,,,,,No,Westminster,E09000033,,SE1 1TE,,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,8,0,0,0,,0,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,0,,,,,,,,,,,,,,,,,,,9,1,,,,,,,,,,,,,,,,not_started,,6,{scheme_code},{scheme_service_name},{scheme_sensitive},Missing,No,DLUHC,{scheme_primary_client_group},,{scheme_secondary_client_group},{scheme_support_type},{scheme_intended_stay},2021-04-01 00:00:00 +0100,{location_code},SE1 1TE,Downing Street,20,Bungalow,Fitted with equipment and adaptations,Westminster,{location_startdate}

1 id status created_at updated_at created_by_name is_dpo owning_organisation_name managing_organisation_name collection_start_year needstype renewal startdate rent_type_detail irproduct_other tenancycode propcode age1 sex1 ecstat1 hhmemb relat2 age2 sex2 retirement_value_check ecstat2 armedforces leftreg illness housingneeds_a housingneeds_b housingneeds_c housingneeds_h is_previous_la_inferred prevloc_label prevloc illness_type_1 illness_type_2 is_la_inferred la_label la postcode_known postcode_full previous_la_known wchair preg_occ cbl earnings incfreq net_income_value_check benefits hb period brent scharge pscharge supcharg tcharge offered layear ppostcode_full mrcdate declaration ethnic national prevten age3 sex3 ecstat3 age4 sex4 ecstat4 age5 sex5 ecstat5 age6 sex6 ecstat6 age7 sex7 ecstat7 age8 sex8 ecstat8 homeless underoccupation_benefitcap reservist startertenancy tenancylength tenancy rsnvac unittype_gn beds waityear reasonpref chr cap reasonother housingneeds_f housingneeds_g illness_type_3 illness_type_4 illness_type_8 illness_type_5 illness_type_6 illness_type_7 illness_type_9 illness_type_10 rp_homeless rp_insan_unsat rp_medwel rp_hardship rp_dontknow tenancyother property_owner_organisation property_manager_organisation purchaser_code reason majorrepairs hbrentshortfall property_relet incref first_time_property_let_as_social_housing unitletas builtype voiddate renttype lettype totchild totelder totadult net_income_known nocharge is_carehome household_charge referral tshortfall chcharge ppcodenk age1_known age2_known age3_known age4_known age5_known age6_known age7_known age8_known ethnic_group letting_allocation_unknown details_known_2 details_known_3 details_known_4 details_known_5 details_known_6 details_known_7 details_known_8 has_benefits wrent wscharge wpschrge wsupchrg wtcharge wtshortfall refused housingneeds wchchrg newprop relat3 relat4 relat5 relat6 relat7 relat8 rent_value_check old_form_id lar irproduct old_id joint tshortfall_known sheltered pregnancy_value_check hhtype new_old vacdays major_repairs_date_value_check void_date_value_check housingneeds_type housingneeds_other unresolved updated_by_id uprn uprn_known uprn_confirmed address_line1 address_line2 town_or_city county carehome_charges_value_check status_cache discarded_at unittype_sh scheme_code scheme_service_name scheme_sensitive scheme_type scheme_registered_under_care_act scheme_owning_organisation_name scheme_primary_client_group scheme_has_other_client_group scheme_secondary_client_group scheme_support_type scheme_intended_stay scheme_created_at location_code location_postcode location_name location_units location_type_of_unit location_mobility_type location_admin_district location_startdate
2 {id} in_progress 2022-02-08 16:52:15 +0000 2022-02-08 16:52:15 +0000 Danny Rojas No DLUHC DLUHC 2021 Supported housing 2 October 2021 London Affordable Rent No No Westminster E09000033 SE1 1TE No 2 8 0 0 0 0 0 0 9 1 not_started 6 {scheme_code} {scheme_service_name} {scheme_sensitive} Missing No DLUHC {scheme_primary_client_group} {scheme_secondary_client_group} {scheme_support_type} {scheme_intended_stay} 2021-04-01 00:00:00 +0100 {location_code} SE1 1TE Downing Street 20 Bungalow Fitted with equipment and adaptations Westminster {location_startdate}

4
spec/fixtures/files/lettings_logs_download_codes_only.csv vendored

@ -1,2 +1,2 @@
id,status,created_at,updated_at,created_by_name,is_dpo,owning_organisation_name,managing_organisation_name,collection_start_year,rent_value_check,needstype,renewal,startdate,rent_type_detail,irproduct_other,tenancycode,propcode,age1,sex1,ecstat1,hhmemb,relat2,age2,sex2,retirement_value_check,ecstat2,armedforces,leftreg,illness,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_h,is_previous_la_inferred,prevloc_label,prevloc,illness_type_1,illness_type_2,is_la_inferred,la_label,la,postcode_known,postcode_full,previous_la_known,wchair,preg_occ,cbl,earnings,incfreq,net_income_value_check,benefits,hb,period,brent,scharge,pscharge,supcharg,tcharge,offered,layear,ppostcode_full,mrcdate,declaration,ethnic,national,prevten,age3,sex3,ecstat3,age4,sex4,ecstat4,age5,sex5,ecstat5,age6,sex6,ecstat6,age7,sex7,ecstat7,age8,sex8,ecstat8,homeless,underoccupation_benefitcap,reservist,startertenancy,tenancylength,tenancy,rsnvac,unittype_gn,beds,waityear,reasonpref,chr,cap,reasonother,housingneeds_f,housingneeds_g,illness_type_3,illness_type_4,illness_type_8,illness_type_5,illness_type_6,illness_type_7,illness_type_9,illness_type_10,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,tenancyother,property_owner_organisation,property_manager_organisation,purchaser_code,reason,majorrepairs,hbrentshortfall,property_relet,incref,first_time_property_let_as_social_housing,unitletas,builtype,voiddate,renttype,lettype,totchild,totelder,totadult,net_income_known,nocharge,is_carehome,household_charge,referral,tshortfall,chcharge,ppcodenk,age1_known,age2_known,age3_known,age4_known,age5_known,age6_known,age7_known,age8_known,ethnic_group,letting_allocation_unknown,details_known_2,details_known_3,details_known_4,details_known_5,details_known_6,details_known_7,details_known_8,has_benefits,wrent,wscharge,wpschrge,wsupchrg,wtcharge,wtshortfall,refused,housingneeds,wchchrg,newprop,relat3,relat4,relat5,relat6,relat7,relat8,old_form_id,lar,irproduct,old_id,joint,tshortfall_known,sheltered,pregnancy_value_check,hhtype,new_old,vacdays,major_repairs_date_value_check,void_date_value_check,housingneeds_type,housingneeds_other,unresolved,updated_by_id,uprn,uprn_known,uprn_confirmed,address_line1,address_line2,town_or_city,county,carehome_charges_value_check,status_cache,discarded_at,unittype_sh,scheme_code,scheme_service_name,scheme_sensitive,scheme_type,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_admin_district,location_startdate id,status,created_at,updated_at,created_by_name,is_dpo,owning_organisation_name,managing_organisation_name,collection_start_year,needstype,renewal,startdate,rent_type_detail,irproduct_other,tenancycode,propcode,age1,sex1,ecstat1,hhmemb,relat2,age2,sex2,retirement_value_check,ecstat2,armedforces,leftreg,illness,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_h,is_previous_la_inferred,prevloc_label,prevloc,illness_type_1,illness_type_2,is_la_inferred,la_label,la,postcode_known,postcode_full,previous_la_known,wchair,preg_occ,cbl,earnings,incfreq,net_income_value_check,benefits,hb,period,brent,scharge,pscharge,supcharg,tcharge,offered,layear,ppostcode_full,mrcdate,declaration,ethnic,national,prevten,age3,sex3,ecstat3,age4,sex4,ecstat4,age5,sex5,ecstat5,age6,sex6,ecstat6,age7,sex7,ecstat7,age8,sex8,ecstat8,homeless,underoccupation_benefitcap,reservist,startertenancy,tenancylength,tenancy,rsnvac,unittype_gn,beds,waityear,reasonpref,chr,cap,reasonother,housingneeds_f,housingneeds_g,illness_type_3,illness_type_4,illness_type_8,illness_type_5,illness_type_6,illness_type_7,illness_type_9,illness_type_10,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,tenancyother,property_owner_organisation,property_manager_organisation,purchaser_code,reason,majorrepairs,hbrentshortfall,property_relet,incref,first_time_property_let_as_social_housing,unitletas,builtype,voiddate,renttype,lettype,totchild,totelder,totadult,net_income_known,nocharge,is_carehome,household_charge,referral,tshortfall,chcharge,ppcodenk,age1_known,age2_known,age3_known,age4_known,age5_known,age6_known,age7_known,age8_known,ethnic_group,letting_allocation_unknown,details_known_2,details_known_3,details_known_4,details_known_5,details_known_6,details_known_7,details_known_8,has_benefits,wrent,wscharge,wpschrge,wsupchrg,wtcharge,wtshortfall,refused,housingneeds,wchchrg,newprop,relat3,relat4,relat5,relat6,relat7,relat8,rent_value_check,old_form_id,lar,irproduct,old_id,joint,tshortfall_known,sheltered,pregnancy_value_check,hhtype,new_old,vacdays,major_repairs_date_value_check,void_date_value_check,housingneeds_type,housingneeds_other,unresolved,updated_by_id,uprn,uprn_known,uprn_confirmed,address_line1,address_line2,town_or_city,county,carehome_charges_value_check,status_cache,discarded_at,unittype_sh,scheme_code,scheme_service_name,scheme_sensitive,scheme_type,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_admin_district,location_startdate
{id},in_progress,2022-02-08 16:52:15 +0000,2022-02-08 16:52:15 +0000,Danny Rojas,false,DLUHC,DLUHC,2021,,2,,2 October 2021,2,,,,,,,,,,,,,,,,,,,,false,,,,,false,Westminster,E09000033,,SE1 1TE,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,8,0,0,0,,0,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,0,,,,,,,,,,,,,,,,,,9,1,,,,,,,,,,,,,,,,not_started,,6,{scheme_code},{scheme_service_name},{scheme_sensitive},0,1,DLUHC,{scheme_primary_client_group},,{scheme_secondary_client_group},{scheme_support_type},{scheme_intended_stay},2021-04-01 00:00:00 +0100,{location_code},SE1 1TE,Downing Street,20,6,A,Westminster,{location_startdate} {id},in_progress,2022-02-08 16:52:15 +0000,2022-02-08 16:52:15 +0000,Danny Rojas,false,DLUHC,DLUHC,2021,2,,2 October 2021,2,,,,,,,,,,,,,,,,,,,,false,,,,,false,Westminster,E09000033,,SE1 1TE,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,8,0,0,0,,0,,,,,,,,,,,,,,,,,,,,,,,,0,,,,,,,0,,,,,,,,,,,,,,,,,,,9,1,,,,,,,,,,,,,,,,not_started,,6,{scheme_code},{scheme_service_name},{scheme_sensitive},0,1,DLUHC,{scheme_primary_client_group},,{scheme_secondary_client_group},{scheme_support_type},{scheme_intended_stay},2021-04-01 00:00:00 +0100,{location_code},SE1 1TE,Downing Street,20,6,A,Westminster,{location_startdate}

1 id status created_at updated_at created_by_name is_dpo owning_organisation_name managing_organisation_name collection_start_year needstype renewal startdate rent_type_detail irproduct_other tenancycode propcode age1 sex1 ecstat1 hhmemb relat2 age2 sex2 retirement_value_check ecstat2 armedforces leftreg illness housingneeds_a housingneeds_b housingneeds_c housingneeds_h is_previous_la_inferred prevloc_label prevloc illness_type_1 illness_type_2 is_la_inferred la_label la postcode_known postcode_full previous_la_known wchair preg_occ cbl earnings incfreq net_income_value_check benefits hb period brent scharge pscharge supcharg tcharge offered layear ppostcode_full mrcdate declaration ethnic national prevten age3 sex3 ecstat3 age4 sex4 ecstat4 age5 sex5 ecstat5 age6 sex6 ecstat6 age7 sex7 ecstat7 age8 sex8 ecstat8 homeless underoccupation_benefitcap reservist startertenancy tenancylength tenancy rsnvac unittype_gn beds waityear reasonpref chr cap reasonother housingneeds_f housingneeds_g illness_type_3 illness_type_4 illness_type_8 illness_type_5 illness_type_6 illness_type_7 illness_type_9 illness_type_10 rp_homeless rp_insan_unsat rp_medwel rp_hardship rp_dontknow tenancyother property_owner_organisation property_manager_organisation purchaser_code reason majorrepairs hbrentshortfall property_relet incref first_time_property_let_as_social_housing unitletas builtype voiddate renttype lettype totchild totelder totadult net_income_known nocharge is_carehome household_charge referral tshortfall chcharge ppcodenk age1_known age2_known age3_known age4_known age5_known age6_known age7_known age8_known ethnic_group letting_allocation_unknown details_known_2 details_known_3 details_known_4 details_known_5 details_known_6 details_known_7 details_known_8 has_benefits wrent wscharge wpschrge wsupchrg wtcharge wtshortfall refused housingneeds wchchrg newprop relat3 relat4 relat5 relat6 relat7 relat8 rent_value_check old_form_id lar irproduct old_id joint tshortfall_known sheltered pregnancy_value_check hhtype new_old vacdays major_repairs_date_value_check void_date_value_check housingneeds_type housingneeds_other unresolved updated_by_id uprn uprn_known uprn_confirmed address_line1 address_line2 town_or_city county carehome_charges_value_check status_cache discarded_at unittype_sh scheme_code scheme_service_name scheme_sensitive scheme_type scheme_registered_under_care_act scheme_owning_organisation_name scheme_primary_client_group scheme_has_other_client_group scheme_secondary_client_group scheme_support_type scheme_intended_stay scheme_created_at location_code location_postcode location_name location_units location_type_of_unit location_mobility_type location_admin_district location_startdate
2 {id} in_progress 2022-02-08 16:52:15 +0000 2022-02-08 16:52:15 +0000 Danny Rojas false DLUHC DLUHC 2021 2 2 October 2021 2 false false Westminster E09000033 SE1 1TE 2 2 8 0 0 0 0 0 0 9 1 not_started 6 {scheme_code} {scheme_service_name} {scheme_sensitive} 0 1 DLUHC {scheme_primary_client_group} {scheme_secondary_client_group} {scheme_support_type} {scheme_intended_stay} 2021-04-01 00:00:00 +0100 {location_code} SE1 1TE Downing Street 20 6 A Westminster {location_startdate}

16
spec/models/form/lettings/subsections/setup_spec.rb

@ -15,22 +15,14 @@ RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
expect(setup.pages.map(&:id)).to eq( expect(setup.pages.map(&:id)).to eq(
%w[ %w[
stock_owner stock_owner
stock_owner_min_rent_value_check
stock_owner_max_rent_value_check
managing_organisation managing_organisation
created_by created_by
needs_type needs_type
scheme scheme
location location
needs_type_min_rent_value_check
needs_type_max_rent_value_check
renewal renewal
tenancy_start_date tenancy_start_date
start_date_min_rent_value_check
start_date_max_rent_value_check
rent_type rent_type
rent_type_min_rent_value_check
rent_type_max_rent_value_check
tenant_code tenant_code
property_reference property_reference
], ],
@ -50,22 +42,14 @@ RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
expect(setup.pages.map(&:id)).to eq( expect(setup.pages.map(&:id)).to eq(
%w[ %w[
stock_owner stock_owner
stock_owner_min_rent_value_check
stock_owner_max_rent_value_check
managing_organisation managing_organisation
created_by created_by
needs_type needs_type
scheme scheme
location location
needs_type_min_rent_value_check
needs_type_max_rent_value_check
renewal renewal
tenancy_start_date tenancy_start_date
start_date_min_rent_value_check
start_date_max_rent_value_check
rent_type rent_type
rent_type_min_rent_value_check
rent_type_max_rent_value_check
tenant_code tenant_code
property_reference property_reference
], ],

6
spec/models/form/sales/subsections/setup_spec.rb

@ -17,17 +17,11 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
organisation organisation
created_by created_by
completion_date completion_date
completion_date_check
purchaser_code purchaser_code
ownership_scheme ownership_scheme
shared_ownership_type shared_ownership_type
discounted_ownership_type discounted_ownership_type
outright_ownership_type outright_ownership_type
ownership_type_old_persons_shared_ownership_value_check
monthly_charges_type_value_check
discounted_sale_type_value_check
buyer_1_live_in_property_type_value_check
buyer_2_live_in_property_type_value_check
buyer_company buyer_company
buyer_live buyer_live
joint_purchase joint_purchase

4
spec/models/form_spec.rb

@ -354,9 +354,9 @@ RSpec.describe Form, type: :model do
expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup) expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup)
expect(form.subsections.count).to eq(1) expect(form.subsections.count).to eq(1)
expect(form.subsections.first.id).to eq("setup") expect(form.subsections.first.id).to eq("setup")
expect(form.pages.count).to eq(18) expect(form.pages.count).to eq(12)
expect(form.pages.first.id).to eq("organisation") expect(form.pages.first.id).to eq("organisation")
expect(form.questions.count).to eq(19) expect(form.questions.count).to eq(13)
expect(form.questions.first.id).to eq("owning_organisation_id") expect(form.questions.first.id).to eq("owning_organisation_id")
expect(form.start_date).to eq(Time.zone.parse("2022-04-01")) expect(form.start_date).to eq(Time.zone.parse("2022-04-01"))
expect(form.end_date).to eq(Time.zone.parse("2023-06-07")) expect(form.end_date).to eq(Time.zone.parse("2023-06-07"))

2
spec/models/lettings_log_spec.rb

@ -2248,7 +2248,6 @@ RSpec.describe LettingsLog do
it "returns optional fields" do it "returns optional fields" do
expect(lettings_log.optional_fields).to eq(%w[ expect(lettings_log.optional_fields).to eq(%w[
rent_value_check
first_time_property_let_as_social_housing first_time_property_let_as_social_housing
tenancycode tenancycode
propcode propcode
@ -2263,7 +2262,6 @@ RSpec.describe LettingsLog do
it "returns optional fields" do it "returns optional fields" do
expect(lettings_log.optional_fields).to eq(%w[ expect(lettings_log.optional_fields).to eq(%w[
rent_value_check
first_time_property_let_as_social_housing first_time_property_let_as_social_housing
tenancycode tenancycode
propcode propcode

10
spec/models/sales_log_spec.rb

@ -67,13 +67,8 @@ RSpec.describe SalesLog, type: :model do
it "returns optional fields" do it "returns optional fields" do
expect(sales_log.optional_fields).to eq(%w[ expect(sales_log.optional_fields).to eq(%w[
saledate_check
purchid purchid
monthly_charges_value_check
old_persons_shared_ownership_value_check
othtype othtype
discounted_sale_value_check
buyer_livein_value_check
proplen proplen
mortlen mortlen
frombeds frombeds
@ -86,13 +81,8 @@ RSpec.describe SalesLog, type: :model do
it "returns optional fields" do it "returns optional fields" do
expect(sales_log.optional_fields).to eq(%w[ expect(sales_log.optional_fields).to eq(%w[
saledate_check
purchid purchid
monthly_charges_value_check
old_persons_shared_ownership_value_check
othtype othtype
discounted_sale_value_check
buyer_livein_value_check
address_line2 address_line2
county county
postcode_full postcode_full

2
spec/services/csv/lettings_log_csv_service_spec.rb

@ -21,7 +21,6 @@ RSpec.describe Csv::LettingsLogCsvService do
owning_organisation_name owning_organisation_name
managing_organisation_name managing_organisation_name
collection_start_year collection_start_year
rent_value_check
needstype needstype
renewal renewal
startdate startdate
@ -163,6 +162,7 @@ RSpec.describe Csv::LettingsLogCsvService do
pscharge pscharge
supcharg supcharg
tcharge tcharge
rent_value_check
hbrentshortfall hbrentshortfall
tshortfall_known tshortfall_known
tshortfall tshortfall

Loading…
Cancel
Save