Browse Source

Remove text tests from pages and questions

pull/2672/head
Rachael Booth 2 years ago
parent
commit
9f9d755131
  1. 4
      spec/models/form/lettings/pages/address_fallback_spec.rb
  2. 4
      spec/models/form/lettings/pages/address_matcher_spec.rb
  3. 4
      spec/models/form/lettings/pages/address_spec.rb
  4. 4
      spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
  5. 4
      spec/models/form/lettings/pages/created_by_spec.rb
  6. 4
      spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
  7. 4
      spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
  8. 4
      spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
  9. 4
      spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
  10. 4
      spec/models/form/lettings/pages/location_spec.rb
  11. 4
      spec/models/form/lettings/pages/managing_organisation_spec.rb
  12. 4
      spec/models/form/lettings/pages/max_rent_value_check_spec.rb
  13. 4
      spec/models/form/lettings/pages/min_rent_value_check_spec.rb
  14. 4
      spec/models/form/lettings/pages/multiple_partners_value_check_spec.rb
  15. 4
      spec/models/form/lettings/pages/needs_type_spec.rb
  16. 4
      spec/models/form/lettings/pages/net_income_value_check_spec.rb
  17. 4
      spec/models/form/lettings/pages/no_address_found_spec.rb
  18. 4
      spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
  19. 4
      spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
  20. 4
      spec/models/form/lettings/pages/partner_under16_value_check_spec.rb
  21. 4
      spec/models/form/lettings/pages/person_age_spec.rb
  22. 4
      spec/models/form/lettings/pages/person_gender_identity_spec.rb
  23. 4
      spec/models/form/lettings/pages/person_known_spec.rb
  24. 4
      spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
  25. 4
      spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
  26. 4
      spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
  27. 4
      spec/models/form/lettings/pages/person_working_situation_spec.rb
  28. 4
      spec/models/form/lettings/pages/previous_housing_situation_renewal_spec.rb
  29. 4
      spec/models/form/lettings/pages/previous_housing_situation_spec.rb
  30. 4
      spec/models/form/lettings/pages/previous_local_authority_spec.rb
  31. 4
      spec/models/form/lettings/pages/previous_postcode_spec.rb
  32. 4
      spec/models/form/lettings/pages/property_local_authority_spec.rb
  33. 4
      spec/models/form/lettings/pages/property_number_of_times_relet_spec.rb
  34. 4
      spec/models/form/lettings/pages/property_reference_spec.rb
  35. 4
      spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
  36. 4
      spec/models/form/lettings/pages/renewal_spec.rb
  37. 4
      spec/models/form/lettings/pages/rent_type_spec.rb
  38. 4
      spec/models/form/lettings/pages/scheme_spec.rb
  39. 4
      spec/models/form/lettings/pages/sheltered_accommodation_spec.rb
  40. 4
      spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
  41. 4
      spec/models/form/lettings/pages/stock_owner_spec.rb
  42. 4
      spec/models/form/lettings/pages/tenancy_length_periodic_spec.rb
  43. 4
      spec/models/form/lettings/pages/tenancy_length_spec.rb
  44. 4
      spec/models/form/lettings/pages/tenancy_start_date_spec.rb
  45. 4
      spec/models/form/lettings/pages/tenancy_type_spec.rb
  46. 4
      spec/models/form/lettings/pages/tenant_code_spec.rb
  47. 4
      spec/models/form/lettings/pages/uprn_confirmation_spec.rb
  48. 4
      spec/models/form/lettings/pages/uprn_selection_spec.rb
  49. 4
      spec/models/form/lettings/pages/uprn_spec.rb
  50. 4
      spec/models/form/lettings/pages/void_date_spec.rb
  51. 12
      spec/models/form/lettings/questions/address_line1_for_address_matcher_spec.rb
  52. 12
      spec/models/form/lettings/questions/address_line1_spec.rb
  53. 12
      spec/models/form/lettings/questions/address_line2_spec.rb
  54. 24
      spec/models/form/lettings/questions/age1_known_spec.rb
  55. 16
      spec/models/form/lettings/questions/age_known_spec.rb
  56. 26
      spec/models/form/lettings/questions/age_spec.rb
  57. 22
      spec/models/form/lettings/questions/beds_spec.rb
  58. 12
      spec/models/form/lettings/questions/care_home_charges_value_check_spec.rb
  59. 12
      spec/models/form/lettings/questions/county_spec.rb
  60. 12
      spec/models/form/lettings/questions/created_by_id_spec.rb
  61. 12
      spec/models/form/lettings/questions/declaration_spec.rb
  62. 20
      spec/models/form/lettings/questions/details_known_spec.rb
  63. 16
      spec/models/form/lettings/questions/ethnic_white_spec.rb
  64. 28
      spec/models/form/lettings/questions/gender_identity1_spec.rb
  65. 24
      spec/models/form/lettings/questions/hb_spec.rb
  66. 8
      spec/models/form/lettings/questions/homeless_spec.rb
  67. 8
      spec/models/form/lettings/questions/housingneeds_other_spec.rb
  68. 8
      spec/models/form/lettings/questions/irproduct_other_spec.rb
  69. 8
      spec/models/form/lettings/questions/is_carehome_spec.rb
  70. 22
      spec/models/form/lettings/questions/joint_spec.rb
  71. 8
      spec/models/form/lettings/questions/layear_spec.rb
  72. 8
      spec/models/form/lettings/questions/letting_allocation_spec.rb
  73. 18
      spec/models/form/lettings/questions/location_id_spec.rb
  74. 12
      spec/models/form/lettings/questions/managing_organisation_spec.rb
  75. 12
      spec/models/form/lettings/questions/max_rent_value_check_spec.rb
  76. 12
      spec/models/form/lettings/questions/min_rent_value_check_spec.rb
  77. 12
      spec/models/form/lettings/questions/multiple_partners_value_check_spec.rb
  78. 12
      spec/models/form/lettings/questions/nationality_all_group_spec.rb
  79. 12
      spec/models/form/lettings/questions/nationality_all_spec.rb
  80. 12
      spec/models/form/lettings/questions/nationality_spec.rb
  81. 8
      spec/models/form/lettings/questions/needs_type_spec.rb
  82. 12
      spec/models/form/lettings/questions/no_address_found_spec.rb
  83. 12
      spec/models/form/lettings/questions/offered_spec.rb
  84. 12
      spec/models/form/lettings/questions/partner_under16_value_check_spec.rb
  85. 4
      spec/models/form/lettings/questions/period_spec.rb
  86. 36
      spec/models/form/lettings/questions/person_gender_identity_spec.rb
  87. 20
      spec/models/form/lettings/questions/person_relationship_spec.rb
  88. 20
      spec/models/form/lettings/questions/person_working_situation_spec.rb
  89. 12
      spec/models/form/lettings/questions/postcode_for_address_matcher_spec.rb
  90. 12
      spec/models/form/lettings/questions/postcode_for_full_address_spec.rb
  91. 24
      spec/models/form/lettings/questions/ppcodenk_spec.rb
  92. 24
      spec/models/form/lettings/questions/previous_la_known_spec.rb
  93. 16
      spec/models/form/lettings/questions/previous_let_type_spec.rb
  94. 13
      spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb
  95. 12
      spec/models/form/lettings/questions/previous_tenure_spec.rb
  96. 12
      spec/models/form/lettings/questions/property_reference_spec.rb
  97. 12
      spec/models/form/lettings/questions/reason_renewal_spec.rb
  98. 16
      spec/models/form/lettings/questions/reason_spec.rb
  99. 24
      spec/models/form/lettings/questions/reasonpref_spec.rb
  100. 12
      spec/models/form/lettings/questions/referral_prp_spec.rb
  101. Some files were not shown because too many files have changed in this diff Show More

4
spec/models/form/lettings/pages/address_fallback_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::AddressFallback, type: :model do
expect(page.id).to eq("address")
end
it "has the correct header" do
expect(page.header).to eq("Q12 - What is the property's address?")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/address_matcher_spec.rb

@ -20,10 +20,6 @@ RSpec.describe Form::Lettings::Pages::AddressMatcher, type: :model do
expect(page.id).to eq("address_matcher")
end
it "has the correct header" do
expect(page.header).to eq("Find an address")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/address_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::Address, type: :model do
expect(page.id).to eq("address")
end
it "has the correct header" do
expect(page.header).to eq("Q13 - What is the property's address?")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb

@ -10,10 +10,6 @@ RSpec.describe Form::Lettings::Pages::CareHomeChargesValueCheck, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/created_by_spec.rb

@ -47,10 +47,6 @@ RSpec.describe Form::Lettings::Pages::CreatedBy, type: :model do
expect(page.id).to eq("assigned_to")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb

@ -25,10 +25,6 @@ RSpec.describe Form::Lettings::Pages::FirstTimePropertyLetAsSocialHousing, type:
expect(page.id).to eq("first_time_property_let_as_social_housing")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb

@ -25,10 +25,6 @@ RSpec.describe Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite, type: :mo
expect(page.id).to eq("lead_tenant_ethnic_background_white")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/location_spec.rb

@ -25,10 +25,6 @@ RSpec.describe Form::Lettings::Pages::Location, type: :model do
expect(page.id).to eq("location")
end
it "has the correct header" do
expect(page.header).to eq("Location")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/managing_organisation_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::ManagingOrganisation, type: :model do
expect(page.id).to eq("managing_organisation")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/max_rent_value_check_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::MaxRentValueCheck, type: :model do
expect(page.id).to eq("max_rent_value_check")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has correct depends_on" do
expect(page.depends_on).to eq([{ "rent_in_soft_max_range?" => true }])
end

4
spec/models/form/lettings/pages/min_rent_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::MinRentValueCheck, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/multiple_partners_value_check_spec.rb

@ -13,10 +13,6 @@ RSpec.describe Form::Lettings::Pages::MultiplePartnersValueCheck, type: :model d
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/needs_type_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::NeedsType, type: :model do
expect(page.id).to eq("needs_type")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/net_income_value_check_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::NetIncomeValueCheck, type: :model do
expect(page.id).to eq("net_income_value_check")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has correct depends_on" do
expect(page.depends_on).to eq([{ "net_income_soft_validation_triggered?" => true }])
end

4
spec/models/form/lettings/pages/no_address_found_spec.rb

@ -20,10 +20,6 @@ RSpec.describe Form::Lettings::Pages::NoAddressFound, type: :model do
expect(page.id).to eq("no_address_found")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has correct depends_on" do
expect(page.depends_on).to eq([{ "address_options_present?" => false,
"is_supported_housing?" => false,

4
spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCh
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/partner_under16_value_check_spec.rb

@ -13,10 +13,6 @@ RSpec.describe Form::Lettings::Pages::PartnerUnder16ValueCheck, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/person_age_spec.rb

@ -12,10 +12,6 @@ RSpec.describe Form::Lettings::Pages::PersonAge, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/person_gender_identity_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::PersonGenderIdentity, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/person_known_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::PersonKnown, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to eq("You’ve given us the details for 1 person in the household")
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::PersonRelationshipToLead, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/person_working_situation_spec.rb

@ -11,10 +11,6 @@ RSpec.describe Form::Lettings::Pages::PersonWorkingSituation, type: :model do
expect(page.subsection).to eq(subsection)
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be nil
end

4
spec/models/form/lettings/pages/previous_housing_situation_renewal_spec.rb

@ -17,10 +17,6 @@ RSpec.describe Form::Lettings::Pages::PreviousHousingSituationRenewal, type: :mo
expect(page.id).to eq("previous_housing_situation_renewal")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/previous_housing_situation_spec.rb

@ -17,10 +17,6 @@ RSpec.describe Form::Lettings::Pages::PreviousHousingSituation, type: :model do
expect(page.id).to eq("previous_housing_situation")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/previous_local_authority_spec.rb

@ -24,10 +24,6 @@ RSpec.describe Form::Lettings::Pages::PreviousLocalAuthority, type: :model do
expect(page.id).to eq("previous_local_authority")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/previous_postcode_spec.rb

@ -24,10 +24,6 @@ RSpec.describe Form::Lettings::Pages::PreviousPostcode, type: :model do
expect(page.id).to eq("previous_postcode")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/property_local_authority_spec.rb

@ -28,10 +28,6 @@ RSpec.describe Form::Lettings::Pages::PropertyLocalAuthority, type: :model do
expect(page.id).to eq("property_local_authority")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/property_number_of_times_relet_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::PropertyNumberOfTimesRelet, type: :model d
expect(page.id).to eq("property_number_of_times_relet")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/property_reference_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::PropertyReference, type: :model do
expect(page.id).to eq("property_reference")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb

@ -21,10 +21,6 @@ RSpec.describe Form::Lettings::Pages::PropertyWheelchairAccessible, type: :model
expect(page.id).to eq("property_wheelchair_accessible")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/renewal_spec.rb

@ -25,10 +25,6 @@ RSpec.describe Form::Lettings::Pages::Renewal, type: :model do
expect(page.id).to eq("renewal")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/rent_type_spec.rb

@ -25,10 +25,6 @@ RSpec.describe Form::Lettings::Pages::RentType, type: :model do
expect(page.id).to eq("rent_type")
end
it "has the correct header" do
expect(page.header).to eq("Rent Type")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/scheme_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::Scheme, type: :model do
expect(page.id).to eq("scheme")
end
it "has the correct header" do
expect(page.header).to eq("Scheme")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/sheltered_accommodation_spec.rb

@ -17,10 +17,6 @@ RSpec.describe Form::Lettings::Pages::ShelteredAccommodation, type: :model do
expect(page.id).to eq("sheltered_accommodation")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/starter_tenancy_type_spec.rb

@ -23,10 +23,6 @@ RSpec.describe Form::Lettings::Pages::StarterTenancyType, type: :model do
expect(page.id).to eq("starter_tenancy_type")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/stock_owner_spec.rb

@ -20,10 +20,6 @@ RSpec.describe Form::Lettings::Pages::StockOwner, type: :model do
expect(page.id).to eq("stock_owner")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/tenancy_length_periodic_spec.rb

@ -17,10 +17,6 @@ RSpec.describe Form::Lettings::Pages::TenancyLengthPeriodic, type: :model do
expect(page.id).to eq "tenancy_length_periodic"
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/tenancy_length_spec.rb

@ -17,10 +17,6 @@ RSpec.describe Form::Lettings::Pages::TenancyLength, type: :model do
expect(page.id).to eq "tenancy_length"
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/tenancy_start_date_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::TenancyStartDate, type: :model do
expect(page.id).to eq("tenancy_start_date")
end
it "has the correct header" do
expect(page.header).to be nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/tenancy_type_spec.rb

@ -17,10 +17,6 @@ RSpec.describe Form::Lettings::Pages::TenancyType, type: :model do
expect(page.id).to eq "tenancy_type"
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/tenant_code_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::TenantCode, type: :model do
expect(page.id).to eq("tenant_code")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/uprn_confirmation_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::UprnConfirmation, type: :model do
expect(page.id).to eq("uprn_confirmation")
end
it "has the correct header" do
expect(page.header).to eq("We found an address that might be this property")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/uprn_selection_spec.rb

@ -20,10 +20,6 @@ RSpec.describe Form::Lettings::Pages::UprnSelection, type: :model do
expect(page.id).to eq("uprn_selection")
end
it "has the correct header" do
expect(page.header).to eq("We found some addresses that might be this property")
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/uprn_spec.rb

@ -25,10 +25,6 @@ RSpec.describe Form::Lettings::Pages::Uprn, type: :model do
expect(page.id).to eq("uprn")
end
it "has the correct header" do
expect(page.header).to be_nil
end
it "has the correct description" do
expect(page.description).to be_nil
end

4
spec/models/form/lettings/pages/void_date_spec.rb

@ -19,10 +19,6 @@ RSpec.describe Form::Lettings::Pages::VoidDate, type: :model do
expect(page.id).to eq("void_date")
end
it "has the correct header" do
expect(page.header).to eq("Void date")
end
it "has the correct description" do
expect(page.description).to be_nil
end

12
spec/models/form/lettings/questions/address_line1_for_address_matcher_spec.rb

@ -16,18 +16,10 @@ RSpec.describe Form::Lettings::Questions::AddressLine1ForAddressMatcher, type: :
expect(question.id).to eq("address_line1_input")
end
it "has the correct header" do
expect(question.header).to eq("Address line 1")
end
it "has the correct error label" do
expect(question.error_label).to eq("Address line 1")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Find address")
end
it "has the correct question_number" do
expect(question.question_number).to eq(nil)
end
@ -40,10 +32,6 @@ RSpec.describe Form::Lettings::Questions::AddressLine1ForAddressMatcher, type: :
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct answer label" do
expect(question.answer_label(log)).to eq("Address line 1\nAA1 1AA")
end

12
spec/models/form/lettings/questions/address_line1_spec.rb

@ -15,18 +15,10 @@ RSpec.describe Form::Lettings::Questions::AddressLine1, type: :model do
expect(question.id).to eq("address_line1")
end
it "has the correct header" do
expect(question.header).to eq("Address line 1")
end
it "has the correct error label" do
expect(question.error_label).to eq("Address line 1")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Address lines 1 and 2")
end
it "has the correct question_number" do
expect(question.question_number).to eq(12)
end
@ -39,10 +31,6 @@ RSpec.describe Form::Lettings::Questions::AddressLine1, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct inferred check answers value" do
expect(question.inferred_check_answers_value).to be_nil
end

12
spec/models/form/lettings/questions/address_line2_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::AddressLine2, type: :model do
expect(question.id).to eq("address_line2")
end
it "has the correct header" do
expect(question.header).to eq("Address line 2 (optional)")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to be_nil
end
it "has the correct type" do
expect(question.type).to eq("text")
end
@ -31,10 +23,6 @@ RSpec.describe Form::Lettings::Questions::AddressLine2, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct inferred check answers value" do
expect(question.inferred_check_answers_value).to be_nil
end

24
spec/models/form/lettings/questions/age1_known_spec.rb

@ -33,18 +33,10 @@ RSpec.describe Form::Lettings::Questions::Age1Known, type: :model do
})
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("")
end
it "has the correct id" do
expect(question.id).to eq("age1_known")
end
it "has the correct header" do
expect(question.header).to eq("Do you know the lead tenant’s age?")
end
it "has correct conditional for" do
expect(question.conditional_for).to eq({
"age1" => [0],
@ -69,20 +61,4 @@ RSpec.describe Form::Lettings::Questions::Age1Known, type: :model do
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(1)
end
context "with 2023/24 form" do
it "has the correct hint" do
expect(question.hint_text).to eq("The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest.")
end
end
context "with 2024/25 form" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("The ’lead’ or ’main’ tenant is the person in the household who does the most paid work. If several people do the same amount of paid work, the lead tenant is whoever is the oldest.")
end
end
end

16
spec/models/form/lettings/questions/age_known_spec.rb

@ -26,23 +26,11 @@ RSpec.describe Form::Lettings::Questions::AgeKnown, type: :model do
})
end
it "has the correct hint" do
expect(question.hint_text).to eq("")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("")
end
context "with person 2" do
it "has the correct id" do
expect(question.id).to eq("age2_known")
end
it "has the correct header" do
expect(question.header).to eq("Do you know person 2’s age?")
end
it "has correct conditional for" do
expect(question.conditional_for).to eq({
"age2" => [0],
@ -76,10 +64,6 @@ RSpec.describe Form::Lettings::Questions::AgeKnown, type: :model do
expect(question.id).to eq("age3_known")
end
it "has the correct header" do
expect(question.header).to eq("Do you know person 3’s age?")
end
it "has correct conditional for" do
expect(question.conditional_for).to eq({
"age3" => [0],

26
spec/models/form/lettings/questions/age_spec.rb

@ -12,10 +12,6 @@ RSpec.describe Form::Lettings::Questions::Age, type: :model do
expect(question.page).to eq(page)
end
it "has the correct header" do
expect(question.header).to eq("Age")
end
it "has the correct type" do
expect(question.type).to eq("numeric")
end
@ -24,20 +20,6 @@ RSpec.describe Form::Lettings::Questions::Age, type: :model do
expect(question.derived?(nil)).to be false
end
context "when child" do
let(:person_type) { "child" }
it "has the correct hint" do
expect(question.hint_text).to eq("For a child under 1, enter 1")
end
end
context "when not child" do
it "has no hint" do
expect(question.hint_text).to be nil
end
end
it "has the correct min" do
expect(question.min).to eq(1)
end
@ -55,10 +37,6 @@ RSpec.describe Form::Lettings::Questions::Age, type: :model do
expect(question.id).to eq("age2")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 2’s age")
end
it "has the correct inferred check answers value" do
expect(question.inferred_check_answers_value).to eq([
{
@ -80,10 +58,6 @@ RSpec.describe Form::Lettings::Questions::Age, type: :model do
expect(question.id).to eq("age3")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 3’s age")
end
it "has the correct inferred check answers value" do
expect(question.inferred_check_answers_value).to eq([
{

22
spec/models/form/lettings/questions/beds_spec.rb

@ -7,28 +7,6 @@ RSpec.describe Form::Lettings::Questions::Beds, type: :model do
let(:subsection) { instance_double(Form::Subsection, form:) }
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
describe "the hint text" do
context "when the start date is before 24/25" do
before do
allow(form).to receive(:start_year_after_2024?).and_return false
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom.")
end
end
context "when the start date is 24/25 or after" do
before do
allow(form).to receive(:start_year_after_2024?).and_return true
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("If shared accommodation, enter the number of bedrooms occupied by this household.")
end
end
end
describe "whether the field is derived" do
context "when the log is a bedsit" do
let(:log) { build(:lettings_log, unittype_gn: 2) }

12
spec/models/form/lettings/questions/care_home_charges_value_check_spec.rb

@ -14,14 +14,6 @@ RSpec.describe Form::Lettings::Questions::CareHomeChargesValueCheck, type: :mode
expect(question.id).to eq("carehome_charges_value_check")
end
it "has the correct header" do
expect(question.header).to eq("Are you sure there are no care home charges?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Care home charges confirmation")
end
it "has the correct type" do
expect(question.type).to eq("interruption_screen")
end
@ -30,10 +22,6 @@ RSpec.describe Form::Lettings::Questions::CareHomeChargesValueCheck, type: :mode
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"0" => { "value" => "Yes" },

12
spec/models/form/lettings/questions/county_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::County, type: :model do
expect(question.id).to eq("county")
end
it "has the correct header" do
expect(question.header).to eq("County (optional)")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("County")
end
it "has the correct question_number" do
expect(question.question_number).to eq(12)
end
@ -35,10 +27,6 @@ RSpec.describe Form::Lettings::Questions::County, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct inferred check answers value" do
expect(question.inferred_check_answers_value).to be_nil
end

12
spec/models/form/lettings/questions/created_by_id_spec.rb

@ -17,22 +17,10 @@ RSpec.describe Form::Lettings::Questions::CreatedById, type: :model do
expect(question.id).to eq("assigned_to_id")
end
it "has the correct header" do
expect(question.header).to eq("Which user are you creating this log for?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Log owner")
end
it "has the correct type" do
expect(question.type).to eq("select")
end
it "has the correct hint_text" do
expect(question.hint_text).to be_nil
end
it "has the correct answer options" do
expect(question.answer_options).to eq({ "" => "Select an option" })
end

12
spec/models/form/lettings/questions/declaration_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
expect(question.id).to eq("declaration")
end
it "has the correct header" do
expect(question.header).to eq("Declaration")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Tenant has seen the privacy notice")
end
it "has the correct type" do
expect(question.type).to eq("checkbox")
end
@ -39,10 +31,6 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
context "when the form year is before 2024" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)

20
spec/models/form/lettings/questions/details_known_spec.rb

@ -19,23 +19,11 @@ RSpec.describe Form::Lettings::Questions::DetailsKnown, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to eq("You must provide details for everyone in the household if you know them.")
end
context "with person 2" do
it "has the correct id" do
expect(question.id).to eq("details_known_2")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Details known for person 2")
end
it "has the correct header" do
expect(question.header).to eq("Do you know details for person 2?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(2)
end
@ -48,14 +36,6 @@ RSpec.describe Form::Lettings::Questions::DetailsKnown, type: :model do
expect(question.id).to eq("details_known_3")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Details known for person 3")
end
it "has the correct header" do
expect(question.header).to eq("Do you know details for person 3?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(3)
end

16
spec/models/form/lettings/questions/ethnic_white_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
expect(question.id).to eq("ethnic")
end
it "has the correct header" do
expect(question.header).to eq("Which of the following best describes the lead tenant’s White background?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead tenant’s ethnic background")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -48,10 +40,6 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
"3" => { "value" => "Any other White background" },
})
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest.")
end
end
context "with 2024/25 form" do
@ -68,10 +56,6 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
"3" => { "value" => "Any other White background" },
})
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("")
end
end
it "has the correct check_answers_card_number" do

28
spec/models/form/lettings/questions/gender_identity1_spec.rb

@ -17,14 +17,6 @@ RSpec.describe Form::Lettings::Questions::GenderIdentity1, type: :model do
expect(question.id).to eq("sex1")
end
it "has the correct header" do
expect(question.header).to eq("Which of these best describes the lead tenant’s gender identity?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead tenant’s gender identity")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(1)
end
@ -46,24 +38,4 @@ RSpec.describe Form::Lettings::Questions::GenderIdentity1, type: :model do
"R" => { "value" => "Tenant prefers not to say" },
})
end
context "with form year before 2024" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
end
it "has the correct hint" do
expect(question.hint_text).to eq("The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest.")
end
end
context "with form year >= 2024" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth.")
end
end
end

24
spec/models/form/lettings/questions/hb_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::Hb, type: :model do
expect(question.id).to eq("hb")
end
it "has the correct header" do
expect(question.header).to eq("Is the household likely to be receiving any of these housing-related benefits?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Housing-related benefits received")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -51,22 +43,6 @@ RSpec.describe Form::Lettings::Questions::Hb, type: :model do
})
end
context "with 2023/24 form" do
it "has the correct hint" do
expect(question.hint_text).to eq("")
end
end
context "with 2024/25 form" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("This is about when the tenant is in their new let. If they are unsure about the situation for their new let and their financial and working situation hasn’t changed significantly, answer based on what housing-related benefits they currently receive.")
end
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(0)
end

8
spec/models/form/lettings/questions/homeless_spec.rb

@ -13,14 +13,6 @@ RSpec.describe Form::Lettings::Questions::Homeless, type: :model do
expect(question.id).to eq("homeless")
end
it "has the correct header" do
expect(question.header).to eq("Did the household experience homelessness immediately before this letting?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Household homeless immediately before letting")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end

8
spec/models/form/lettings/questions/housingneeds_other_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::HousingneedsOther, type: :model do
expect(question.id).to eq("housingneeds_other")
end
it "has the correct header" do
expect(question.header).to eq("Do they have any other disabled access needs?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Other disabled access needs")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end

8
spec/models/form/lettings/questions/irproduct_other_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::IrproductOther, type: :model do
expect(question.id).to eq("irproduct_other")
end
it "has the correct header" do
expect(question.header).to eq("Name of rent product")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Product name")
end
it "has the correct type" do
expect(question.type).to eq("text")
end

8
spec/models/form/lettings/questions/is_carehome_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::IsCarehome, type: :model do
expect(question.id).to eq("is_carehome")
end
it "has the correct header" do
expect(question.header).to eq("Is this accommodation a care home?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Care home accommodation")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end

22
spec/models/form/lettings/questions/joint_spec.rb

@ -23,22 +23,10 @@ RSpec.describe Form::Lettings::Questions::Joint, type: :model do
expect(question.id).to eq("joint")
end
it "has the correct header" do
expect(question.header).to eq("Is this a joint tenancy?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Is this a joint tenancy?")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"1" => { "value" => "Yes" },
@ -51,14 +39,4 @@ RSpec.describe Form::Lettings::Questions::Joint, type: :model do
it "is not marked as derived" do
expect(question.derived?(nil)).to be false
end
context "with collection year on or after 2024" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("This is where two or more people are named on the tenancy agreement")
end
end
end

8
spec/models/form/lettings/questions/layear_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::Layear, type: :model do
expect(question.id).to eq("layear")
end
it "has the correct header" do
expect(question.header).to eq("How long has the household continuously lived in the local authority area of the new letting?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Length of time in local authority area")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end

8
spec/models/form/lettings/questions/letting_allocation_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::LettingAllocation, type: :model do
expect(question.id).to eq("letting_allocation")
end
it "has the correct header" do
expect(question.header).to eq("How was this letting allocated?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Allocation system")
end
it "has the correct type" do
expect(question.type).to eq("checkbox")
end

18
spec/models/form/lettings/questions/location_id_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::LocationId, type: :model do
expect(question.id).to eq("location_id")
end
it "has the correct header" do
expect(question.header).to eq("Which location is this log for?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Location")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -177,16 +169,6 @@ RSpec.describe Form::Lettings::Questions::LocationId, type: :model do
end
end
context "with collection year on or after 2023" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2023, 4, 1))
end
it "has the correct header" do
expect(question.header).to eq("Which location is this letting for?")
end
end
describe "partial guidance" do
it "shows shows correct top_guidance_partial" do
expect(question.top_guidance_partial).to eq("finding_location")

12
spec/models/form/lettings/questions/managing_organisation_spec.rb

@ -15,22 +15,10 @@ RSpec.describe Form::Lettings::Questions::ManagingOrganisation, type: :model do
expect(question.id).to eq("managing_organisation_id")
end
it "has the correct header" do
expect(question.header).to eq("Which organisation manages this letting?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Managing agent")
end
it "has the correct type" do
expect(question.type).to eq("select")
end
it "has the correct hint_text" do
expect(question.hint_text).to be_nil
end
describe "#displayed_answer_options" do
let(:options) { { "" => "Select an option" } }

12
spec/models/form/lettings/questions/max_rent_value_check_spec.rb

@ -15,22 +15,10 @@ RSpec.describe Form::Lettings::Questions::MaxRentValueCheck, type: :model do
expect(question.id).to eq("rent_value_check")
end
it "has the correct header" do
expect(question.header).to eq("Are you sure this is correct?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Total rent confirmation")
end
it "has the correct type" do
expect(question.type).to eq("interruption_screen")
end
it "has the correct hint" do
expect(question.hint_text).to eq("Check the following:<ul class=\"govuk-body-l app-panel--interruption\"><li>the decimal point</li><li>the frequency, for example every week or every calendar month</li><li>the rent type is correct, for example affordable or social rent</li></ul>")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"0" => { "value" => "Yes" },

12
spec/models/form/lettings/questions/min_rent_value_check_spec.rb

@ -15,22 +15,10 @@ RSpec.describe Form::Lettings::Questions::MinRentValueCheck, type: :model do
expect(question.id).to eq("rent_value_check")
end
it "has the correct header" do
expect(question.header).to eq("Are you sure this is correct?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Total rent confirmation")
end
it "has the correct type" do
expect(question.type).to eq("interruption_screen")
end
it "has the correct hint" do
expect(question.hint_text).to eq("Check the following:<ul class=\"govuk-body-l app-panel--interruption\"><li>the decimal point</li><li>the frequency, for example every week or every calendar month</li><li>the rent type is correct, for example affordable or social rent</li></ul>")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"0" => { "value" => "Yes" },

12
spec/models/form/lettings/questions/multiple_partners_value_check_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::MultiplePartnersValueCheck, type: :mod
expect(question.id).to eq("multiple_partners_value_check")
end
it "has the correct header" do
expect(question.header).to eq("Are you sure this is correct?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Multiple partners confirmation")
end
it "has the correct type" do
expect(question.type).to eq("interruption_screen")
end
@ -31,10 +23,6 @@ RSpec.describe Form::Lettings::Questions::MultiplePartnersValueCheck, type: :mod
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has a correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(1)
end

12
spec/models/form/lettings/questions/nationality_all_group_spec.rb

@ -13,22 +13,10 @@ RSpec.describe Form::Lettings::Questions::NationalityAllGroup, type: :model do
expect(question.id).to eq("nationality_all_group")
end
it "has the correct header" do
expect(question.header).to eq("What is the nationality of the lead tenant?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead tenant’s nationality")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("If the lead tenant is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the tenant should decide which country to enter.")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"826" => { "value" => "United Kingdom" },

12
spec/models/form/lettings/questions/nationality_all_spec.rb

@ -13,22 +13,10 @@ RSpec.describe Form::Lettings::Questions::NationalityAll, type: :model do
expect(question.id).to eq("nationality_all")
end
it "has the correct header" do
expect(question.header).to eq("Enter a nationality")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead tenant’s nationality")
end
it "has the correct type" do
expect(question.type).to eq("select")
end
it "has the correct hint_text" do
expect(question.hint_text).to be_nil
end
it "has the correct answer_options" do
expect(question.answer_options.count).to eq(203)
end

12
spec/models/form/lettings/questions/nationality_spec.rb

@ -13,22 +13,10 @@ RSpec.describe Form::Lettings::Questions::Nationality, type: :model do
expect(question.id).to eq("national")
end
it "has the correct header" do
expect(question.header).to eq("What is the nationality of the lead tenant?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Lead tenant’s nationality")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest.")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"18" => { "value" => "United Kingdom" },

8
spec/models/form/lettings/questions/needs_type_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::NeedsType, type: :model do
expect(question.id).to eq("needstype")
end
it "has the correct header" do
expect(question.header).to eq("What is the needs type?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Needs type")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end

12
spec/models/form/lettings/questions/no_address_found_spec.rb

@ -14,14 +14,6 @@ RSpec.describe Form::Lettings::Questions::NoAddressFound, type: :model do
expect(question.id).to eq("address_search_value_check")
end
it "has the correct header" do
expect(question.header).to eq("No address found")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to be_nil
end
it "has the correct type" do
expect(question.type).to eq("interruption_screen")
end
@ -30,10 +22,6 @@ RSpec.describe Form::Lettings::Questions::NoAddressFound, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct answer_options" do
expect(question.answer_options).to be_nil
end

12
spec/models/form/lettings/questions/offered_spec.rb

@ -13,14 +13,6 @@ RSpec.describe Form::Lettings::Questions::Offered, type: :model do
expect(question.id).to eq "offered"
end
it "has the correct header" do
expect(question.header).to eq "How many times was the property offered between becoming vacant and this letting?"
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq "Times previously offered since becoming available."
end
it "has the correct type" do
expect(question.type).to eq "numeric"
end
@ -37,8 +29,4 @@ RSpec.describe Form::Lettings::Questions::Offered, type: :model do
it "is not marked as derived" do
expect(question.derived?(nil)).to be false
end
it "has the correct hint_text" do
expect(question.hint_text).to eq "Do not include the offer that led to this letting. This is after the last tenancy ended. If the property is being offered for let for the first time, enter 0."
end
end

12
spec/models/form/lettings/questions/partner_under16_value_check_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::PartnerUnder16ValueCheck, type: :model
expect(question.id).to eq("partner_under_16_value_check")
end
it "has the correct header" do
expect(question.header).to eq("Are you sure this is correct?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Partner under 16 confirmation")
end
it "has the correct type" do
expect(question.type).to eq("interruption_screen")
end
@ -31,10 +23,6 @@ RSpec.describe Form::Lettings::Questions::PartnerUnder16ValueCheck, type: :model
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has a correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(1)
end

4
spec/models/form/lettings/questions/period_spec.rb

@ -5,10 +5,6 @@ RSpec.describe Form::Lettings::Questions::Period, type: :model do
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has the correct hint" do
expect(question.hint_text).to eq("Select how often the household is charged. This may be different to how often they pay.")
end
it "has correct answer options" do
expect(question.answer_options).to eq(
{

36
spec/models/form/lettings/questions/person_gender_identity_spec.rb

@ -26,39 +26,11 @@ RSpec.describe Form::Lettings::Questions::PersonGenderIdentity, type: :model do
expect(question.derived?(nil)).to be false
end
context "with form year before 2024" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
end
it "has the correct hint" do
expect(question.hint_text).to eq("")
end
end
context "with form year >= 2024" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("This should be however they personally choose to identify from the options below. This may or may not be the same as their biological sex or the sex they were assigned at birth.")
end
end
context "with person 2" do
it "has the correct id" do
expect(question.id).to eq("sex2")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 2’s gender identity")
end
it "has the correct header" do
expect(question.header).to eq("Which of these best describes person 2’s gender identity?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(2)
end
@ -71,14 +43,6 @@ RSpec.describe Form::Lettings::Questions::PersonGenderIdentity, type: :model do
expect(question.id).to eq("sex3")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 3’s gender identity")
end
it "has the correct header" do
expect(question.header).to eq("Which of these best describes person 3’s gender identity?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(3)
end

20
spec/models/form/lettings/questions/person_relationship_spec.rb

@ -27,10 +27,6 @@ RSpec.describe Form::Lettings::Questions::PersonRelationship, type: :model do
"divider" => { "value" => true })
end
it "has the correct hint" do
expect(question.hint_text).to eq("")
end
it "has correct conditional for" do
expect(question.conditional_for).to be nil
end
@ -44,17 +40,9 @@ RSpec.describe Form::Lettings::Questions::PersonRelationship, type: :model do
expect(question.id).to eq("relat2")
end
it "has the correct header" do
expect(question.header).to eq("What is person 2’s relationship to the lead tenant?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(2)
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 2’s relationship to the lead tenant")
end
end
context "with person 3" do
@ -64,16 +52,8 @@ RSpec.describe Form::Lettings::Questions::PersonRelationship, type: :model do
expect(question.id).to eq("relat3")
end
it "has the correct header" do
expect(question.header).to eq("What is person 3’s relationship to the lead tenant?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(3)
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 3’s relationship to the lead tenant")
end
end
end

20
spec/models/form/lettings/questions/person_working_situation_spec.rb

@ -41,10 +41,6 @@ RSpec.describe Form::Lettings::Questions::PersonWorkingSituation, type: :model d
"divider" => { "value" => true })
end
it "has the correct hint" do
expect(question.hint_text).to eq("")
end
it "has correct conditional for" do
expect(question.conditional_for).to be nil
end
@ -58,17 +54,9 @@ RSpec.describe Form::Lettings::Questions::PersonWorkingSituation, type: :model d
expect(question.id).to eq("ecstat2")
end
it "has the correct header" do
expect(question.header).to eq("Which of these best describes person 2’s working situation?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(2)
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 2’s working situation")
end
end
context "with person 3" do
@ -78,16 +66,8 @@ RSpec.describe Form::Lettings::Questions::PersonWorkingSituation, type: :model d
expect(question.id).to eq("ecstat3")
end
it "has the correct header" do
expect(question.header).to eq("Which of these best describes person 3’s working situation?")
end
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(3)
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Person 3’s working situation")
end
end
end

12
spec/models/form/lettings/questions/postcode_for_address_matcher_spec.rb

@ -16,14 +16,6 @@ RSpec.describe Form::Lettings::Questions::PostcodeForAddressMatcher, type: :mode
expect(question.id).to eq("postcode_full_input")
end
it "has the correct header" do
expect(question.header).to eq("Postcode")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq(nil)
end
it "has the correct question_number" do
expect(question.question_number).to eq(nil)
end
@ -36,10 +28,6 @@ RSpec.describe Form::Lettings::Questions::PostcodeForAddressMatcher, type: :mode
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct answer label" do
expect(question.answer_label(log)).to eq("AA1 1AA")
end

12
spec/models/form/lettings/questions/postcode_for_full_address_spec.rb

@ -15,14 +15,6 @@ RSpec.describe Form::Lettings::Questions::PostcodeForFullAddress, type: :model d
expect(question.id).to eq("postcode_full")
end
it "has the correct header" do
expect(question.header).to eq("Postcode")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Postcode")
end
it "has the correct question_number" do
expect(question.question_number).to eq(12)
end
@ -35,10 +27,6 @@ RSpec.describe Form::Lettings::Questions::PostcodeForFullAddress, type: :model d
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
end
it "has the correct width" do
expect(question.width).to eq(5)
end

24
spec/models/form/lettings/questions/ppcodenk_spec.rb

@ -33,18 +33,10 @@ RSpec.describe Form::Lettings::Questions::Ppcodenk, type: :model do
})
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("")
end
it "has the correct id" do
expect(question.id).to eq("ppcodenk")
end
it "has the correct header" do
expect(question.header).to eq("Do you know the postcode of the household’s last settled accommodation?")
end
it "has correct conditional for" do
expect(question.conditional_for).to eq({
"ppostcode_full" => [0],
@ -62,20 +54,4 @@ RSpec.describe Form::Lettings::Questions::Ppcodenk, type: :model do
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(0)
end
context "with 2023/24 form" do
it "has the correct hint" do
expect(question.hint_text).to eq("This is also known as the household’s ‘last settled home’.")
end
end
context "with 2024/25 form" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless.")
end
end
end

24
spec/models/form/lettings/questions/previous_la_known_spec.rb

@ -33,18 +33,10 @@ RSpec.describe Form::Lettings::Questions::PreviousLaKnown, type: :model do
})
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Do you know the local authority of the household’s last settled accommodation?")
end
it "has the correct id" do
expect(question.id).to eq("previous_la_known")
end
it "has the correct header" do
expect(question.header).to eq("Do you know the local authority of the household’s last settled accommodation?")
end
it "has correct conditional for" do
expect(question.conditional_for).to eq({
"prevloc" => [1],
@ -62,20 +54,4 @@ RSpec.describe Form::Lettings::Questions::PreviousLaKnown, type: :model do
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(0)
end
context "with 2023/24 form" do
it "has the correct hint" do
expect(question.hint_text).to eq("This is also known as the household’s ‘last settled home’.")
end
end
context "with 2024/25 form" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless.")
end
end
end

16
spec/models/form/lettings/questions/previous_let_type_spec.rb

@ -21,22 +21,10 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
expect(question.id).to eq "unitletas"
end
it "has the correct header" do
expect(question.header).to eq "What type was the property most recently let as?"
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq "Most recent let type"
end
it "has the correct type" do
expect(question.type).to eq "radio"
end
it "has the correct hint_text" do
expect(question.hint_text).to eq ""
end
it "is not marked as derived" do
expect(question.derived?(nil)).to be false
end
@ -71,9 +59,5 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
"3" => { "value" => "Don’t know" },
})
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("This is the rent type of the previous tenancy in this property.")
end
end
end

13
spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb

@ -9,18 +9,10 @@ RSpec.describe Form::Lettings::Questions::PreviousTenureRenewal, type: :model do
expect(question.id).to eq("prevten")
end
it "has the correct header" do
expect(question.header).to eq("Where was the household immediately before this letting?")
end
it "has correct page" do
expect(question.page).to eq(page)
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Where was the household immediately before this letting?")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -29,11 +21,6 @@ RSpec.describe Form::Lettings::Questions::PreviousTenureRenewal, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to eq("You told us this letting is a renewal. We have removed some options because of this.<br><br>
This is where the household was the night before they moved into this new let.")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"34" => { "value" => "Specialist retirement housing" },

12
spec/models/form/lettings/questions/previous_tenure_spec.rb

@ -9,18 +9,10 @@ RSpec.describe Form::Lettings::Questions::PreviousTenure, type: :model do
expect(question.id).to eq("prevten")
end
it "has the correct header" do
expect(question.header).to eq("Where was the household immediately before this letting?")
end
it "has correct page" do
expect(question.page).to eq(page)
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Where was the household immediately before this letting?")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -29,10 +21,6 @@ RSpec.describe Form::Lettings::Questions::PreviousTenure, type: :model do
expect(question.derived?(nil)).to be false
end
it "has the correct hint" do
expect(question.hint_text).to eq("This is where the household was the night before they moved into this new let.")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"30" => { "value" => "Fixed-term local authority general needs tenancy" },

12
spec/models/form/lettings/questions/property_reference_spec.rb

@ -16,22 +16,10 @@ RSpec.describe Form::Lettings::Questions::PropertyReference, type: :model do
expect(question.id).to eq("propcode")
end
it "has the correct header" do
expect(question.header).to eq("What is the property reference?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Property reference")
end
it "has the correct type" do
expect(question.type).to eq("text")
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("This is how you usually refer to this property on your own systems.")
end
it "has the correct width" do
expect(question.width).to eq(10)
end

12
spec/models/form/lettings/questions/reason_renewal_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
expect(question.id).to eq("reason")
end
it "has the correct header" do
expect(question.header).to eq("What is the tenant’s main reason for the household leaving their last settled home?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Reason for leaving last settled home")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -39,10 +31,6 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
expect(question.check_answers_card_number).to eq(0)
end
it "has the correct hint" do
expect(question.hint_text).to eq("You told us this letting is a renewal. We have removed some options because of this.")
end
it "has the correct conditional_for" do
expect(question.conditional_for).to eq({ "reasonother" => [20] })
end

16
spec/models/form/lettings/questions/reason_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
expect(question.id).to eq("reason")
end
it "has the correct header" do
expect(question.header).to eq("What is the tenant’s main reason for the household leaving their last settled home?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Reason for leaving last settled home")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -48,10 +40,6 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
end
context "with 2023/24 form" do
it "has the correct hint" do
expect(question.hint_text).to eq("The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously.")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"40" => { "value" => "End of assured shorthold tenancy (no fault)" },
@ -99,10 +87,6 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("The tenant’s ‘last settled home’ is their last long-standing home. For tenants who were in temporary accommodation, sleeping rough or otherwise homeless, their last settled home is where they were living previously.")
end
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"50" => { "value" => "End of social or private sector tenancy - no fault" },

24
spec/models/form/lettings/questions/reasonpref_spec.rb

@ -35,18 +35,10 @@ RSpec.describe Form::Lettings::Questions::Reasonpref, type: :model do
})
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Household given reasonable preference")
end
it "has the correct id" do
expect(question.id).to eq("reasonpref")
end
it "has the correct header" do
expect(question.header).to eq("Was the household given ‘reasonable preference’ by the local authority?")
end
it "has correct conditional for" do
expect(question.conditional_for).to be_nil
end
@ -58,20 +50,4 @@ RSpec.describe Form::Lettings::Questions::Reasonpref, type: :model do
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(0)
end
context "with 2023/24 form" do
it "has the correct hint" do
expect(question.hint_text).to eq("Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority.")
end
end
context "with 2024/25 form" do
before do
allow(form).to receive(:start_year_after_2024?).and_return(true)
end
it "has the correct hint" do
expect(question.hint_text).to eq("Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’.")
end
end
end

12
spec/models/form/lettings/questions/referral_prp_spec.rb

@ -23,14 +23,6 @@ RSpec.describe Form::Lettings::Questions::ReferralPrp, type: :model do
expect(question.id).to eq("referral")
end
it "has the correct header" do
expect(question.header).to eq("What was the source of referral for this letting?")
end
it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Source of referral for letting")
end
it "has the correct type" do
expect(question.type).to eq("radio")
end
@ -39,10 +31,6 @@ RSpec.describe Form::Lettings::Questions::ReferralPrp, type: :model do
expect(question.check_answers_card_number).to eq(0)
end
it "has the correct hint" do
expect(question.hint_text).to eq("You told us that the needs type is general needs. We have removed some options because of this.")
end
it "is not marked as derived" do
expect(question).not_to be_derived(nil)
end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save