<%= render SearchComponent.new(current_user:, search_label: "Search by name or email address", value: @searched) %>
From 1d23f9e50a9980553d65197c0e203c97b274fb34 Mon Sep 17 00:00:00 2001
From: Rachael Booth
Date: Thu, 7 Nov 2024 13:18:30 +0000
Subject: [PATCH 2/3] CLDC-3716: Allow 25/26 form use on dev, review, and
staging environments (#2749)
* CLDC-3716: Allow 25/26 form use on dev, review, and staging environments
* Remove empty line
---
app/helpers/filters_helper.rb | 6 +-
app/services/feature_toggle.rb | 2 +-
.../lettings/household_characteristics.en.yml | 0
.../forms/2025/lettings/guidance.en.yml | 63 ++++
.../lettings/household_characteristics.en.yml | 322 ++++++++++++++++
.../2025/lettings/household_needs.en.yml | 57 +++
.../2025/lettings/household_situation.en.yml | 120 ++++++
.../2025/lettings/income_and_benefits.en.yml | 108 ++++++
.../2025/lettings/property_information.en.yml | 127 +++++++
.../locales/forms/2025/lettings/setup.en.yml | 87 +++++
.../2025/lettings/tenancy_information.en.yml | 66 ++++
.../locales/forms/2025/sales/guidance.en.yml | 46 +++
.../sales/household_characteristics.en.yml | 345 ++++++++++++++++++
.../forms/2025/sales/household_needs.en.yml | 34 ++
.../2025/sales/household_situation.en.yml | 50 +++
.../sales/income_benefits_and_savings.en.yml | 90 +++++
.../2025/sales/property_information.en.yml | 91 +++++
.../forms/2025/sales/sale_information.en.yml | 206 +++++++++++
config/locales/forms/2025/sales/setup.en.yml | 110 ++++++
.../forms/2025/sales/soft_validations.en.yml | 244 +++++++++++++
spec/helpers/filters_helper_spec.rb | 46 ++-
21 files changed, 2212 insertions(+), 8 deletions(-)
rename config/locales/forms/2024/{sales => }/lettings/household_characteristics.en.yml (100%)
create mode 100644 config/locales/forms/2025/lettings/guidance.en.yml
create mode 100644 config/locales/forms/2025/lettings/household_characteristics.en.yml
create mode 100644 config/locales/forms/2025/lettings/household_needs.en.yml
create mode 100644 config/locales/forms/2025/lettings/household_situation.en.yml
create mode 100644 config/locales/forms/2025/lettings/income_and_benefits.en.yml
create mode 100644 config/locales/forms/2025/lettings/property_information.en.yml
create mode 100644 config/locales/forms/2025/lettings/setup.en.yml
create mode 100644 config/locales/forms/2025/lettings/tenancy_information.en.yml
create mode 100644 config/locales/forms/2025/sales/guidance.en.yml
create mode 100644 config/locales/forms/2025/sales/household_characteristics.en.yml
create mode 100644 config/locales/forms/2025/sales/household_needs.en.yml
create mode 100644 config/locales/forms/2025/sales/household_situation.en.yml
create mode 100644 config/locales/forms/2025/sales/income_benefits_and_savings.en.yml
create mode 100644 config/locales/forms/2025/sales/property_information.en.yml
create mode 100644 config/locales/forms/2025/sales/sale_information.en.yml
create mode 100644 config/locales/forms/2025/sales/setup.en.yml
create mode 100644 config/locales/forms/2025/sales/soft_validations.en.yml
diff --git a/app/helpers/filters_helper.rb b/app/helpers/filters_helper.rb
index 35fea17e9..3a4c337ea 100644
--- a/app/helpers/filters_helper.rb
+++ b/app/helpers/filters_helper.rb
@@ -143,7 +143,11 @@ module FiltersHelper
}
if FormHandler.instance.in_crossover_period?
- return years.merge({ archived_collection_start_year.to_s => year_combo(archived_collection_start_year) })
+ years = years.merge({ archived_collection_start_year.to_s => year_combo(archived_collection_start_year) })
+ end
+
+ if FeatureToggle.allow_future_form_use?
+ years = { next_collection_start_year.to_s => year_combo(next_collection_start_year) }.merge(years)
end
years
diff --git a/app/services/feature_toggle.rb b/app/services/feature_toggle.rb
index 5312d1964..1b67b8b37 100644
--- a/app/services/feature_toggle.rb
+++ b/app/services/feature_toggle.rb
@@ -1,6 +1,6 @@
class FeatureToggle
def self.allow_future_form_use?
- false
+ Rails.env.development? || Rails.env.review? || Rails.env.staging?
end
def self.bulk_upload_duplicate_log_check_enabled?
diff --git a/config/locales/forms/2024/sales/lettings/household_characteristics.en.yml b/config/locales/forms/2024/lettings/household_characteristics.en.yml
similarity index 100%
rename from config/locales/forms/2024/sales/lettings/household_characteristics.en.yml
rename to config/locales/forms/2024/lettings/household_characteristics.en.yml
diff --git a/config/locales/forms/2025/lettings/guidance.en.yml b/config/locales/forms/2025/lettings/guidance.en.yml
new file mode 100644
index 000000000..340eb11d5
--- /dev/null
+++ b/config/locales/forms/2025/lettings/guidance.en.yml
@@ -0,0 +1,63 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ guidance:
+ finding_location:
+ title: "What is a location?"
+ content: "A location is a postcode area where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode."
+ scheme_changes_link_text: "Read more about schemes and locations"
+
+ finding_scheme:
+ title: "Can’t find your scheme?"
+ content: "Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 \"Which organisation owns this property?\"
+ If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
"
+ scheme_changes_link_text: "Read more about how schemes have changed"
+ view_schemes_link_text: "View your organisation’s schemes"
+
+ privacy_notice_tenant:
+ content: "Make sure the lead tenant has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ rent_type_definitions:
+ title: "Rent type definitions"
+ content: "Social Rent: where target rents are determined through the national rent regime. This is sometimes also known as 'formula rent'.
+ Affordable Rent: where up to 80% of market rent can be charged. A new supply agreement is signed with Homes England or the Greater London Authority (GLA).
+ London Affordable Rent: a tenure of affordable housing available in London by the GLA. It is an affordable rent which must be set in accordance with the Regulator of Social Housing’s Affordable Rent guidance. The landlord of these homes must be registered with the Regulator of Social Housing. These are a type of Affordable Rent lettings.
+ Rent to Buy: a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered first chance to purchase the property (either shared ownership or outright) at full market value. These are a type of Intermediate Rent lettings.
+ London Living Rent: a tenure of affordable housing available in London by the GLA. It was introduced in Affordable Homes Programme 2016 to 2021. These are a type of Intermediate Rent lettings.
+ Other intermediate rent: any other specific scheme where up to 80% of market rent can be charged. This includes schemes with reduced rent so tenants can save towards a house purchasing deposit and schemes with an in-built future opportunity to buy the property being rented.
"
+
+ scheme_selection:
+ data_provider:
+ content: "If you’re not sure which scheme to choose, ask a data coordinator. Find your data coordinators on the %{users_page_link}."
+ users_page_link_text: "users page"
+ data_coordinator:
+ create_scheme_link_text: "Create a new supported housing scheme"
+
+ void_date:
+ title: "What is a void date?"
+ content: "Date the property was (legally or contractually) available to let, or for:
+
+ - re-lets: the day after the previous tenant's contract ended
+ - new builds: the day the landlord legally first owned the property (‘completion date’)
+ - new conversions or acquisitions: completion date, or the day after rehabilitation work ended
+ - new leases: the day the landlord got contractual property rights and could let it out to tenants
+
"
+
+ what_counts_as_income:
+ title: "What counts as income?"
+ content: "You should include any income after tax from:
+
+ - employment
+ - pensions
+ - Universal Credit
+
+
+ Don’t include:
+
+ - National Insurance (NI) contributions and tax
+ - housing benefit
+ - child benefit
+ - council tax support
+
"
diff --git a/config/locales/forms/2025/lettings/household_characteristics.en.yml b/config/locales/forms/2025/lettings/household_characteristics.en.yml
new file mode 100644
index 000000000..1aef9297a
--- /dev/null
+++ b/config/locales/forms/2025/lettings/household_characteristics.en.yml
@@ -0,0 +1,322 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ household_characteristics:
+ hhmemb:
+ page_header: ""
+ check_answer_label: "Number of household members"
+ hint_text: "You can provide details for a maximum of 8 people."
+ question_text: "How many people live in the household for this letting?"
+
+ age1:
+ page_header: ""
+ age1_known:
+ check_answer_label: ""
+ hint_text: "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."
+ question_text: "Do you know the lead tenant’s age?"
+ age1:
+ check_answer_label: "Lead tenant’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes the lead tenant’s gender identity?"
+
+ ethnic_group:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic group"
+ hint_text: ""
+ question_text: "What is the lead tenant’s ethnic group?"
+
+ ethnic:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes the lead tenant’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Lead tenant’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes lead tenant’s White background?"
+
+ nationality_all:
+ page_header: ""
+ nationality_all:
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+ nationality_all_group:
+ check_answer_label: "Lead tenant’s nationality"
+ hint_text: "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."
+ question_text: "What is the nationality of the lead tenant?"
+
+ ecstat1:
+ page_header: ""
+ check_answer_label: "Lead tenant’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes the lead tenant’s working situation?"
+
+ details_known_2:
+ page_header: "You’ve given us the details for 1 person in the household"
+ check_answer_label: "Details known for person 2"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 2?"
+
+ relat2:
+ page_header: ""
+ check_answer_label: "Person 2’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 2’s relationship to the lead tenant?"
+
+ age2:
+ page_header: ""
+ age2_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 2’s age?"
+ age2:
+ check_answer_label: "Person 2’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex2:
+ page_header: ""
+ check_answer_label: "Person 2’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 2’s gender identity?"
+
+ ecstat2:
+ page_header: ""
+ check_answer_label: "Person 2’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 2’s working situation?"
+
+ details_known_3:
+ page_header: "You’ve given us the details for 2 people in the household"
+ check_answer_label: "Details known for person 3"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 3?"
+
+ relat3:
+ page_header: ""
+ check_answer_label: "Person 3’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 3’s relationship to the lead tenant?"
+
+ age3:
+ page_header: ""
+ age3_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 3’s age?"
+ age3:
+ check_answer_label: "Person 3’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex3:
+ page_header: ""
+ check_answer_label: "Person 3’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 3’s gender identity?"
+
+ ecstat3:
+ page_header: ""
+ check_answer_label: "Person 3’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 3’s working situation?"
+
+ details_known_4:
+ page_header: "You’ve given us the details for 3 people in the household"
+ check_answer_label: "Details known for person 4"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 4?"
+
+ relat4:
+ page_header: ""
+ check_answer_label: "Person 4’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 4’s relationship to the lead tenant?"
+
+ age4:
+ page_header: ""
+ age4_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 4’s age?"
+ age4:
+ check_answer_label: "Person 4’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex4:
+ page_header: ""
+ check_answer_label: "Person 4’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 4’s gender identity?"
+
+ ecstat4:
+ page_header: ""
+ check_answer_label: "Person 4’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 4’s working situation?"
+
+ details_known_5:
+ page_header: "You’ve given us the details for 4 people in the household"
+ check_answer_label: "Details known for person 5"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 5?"
+
+ relat5:
+ page_header: ""
+ check_answer_label: "Person 5’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 5’s relationship to the lead tenant?"
+
+ age5:
+ page_header: ""
+ age5_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 5’s age?"
+ age5:
+ check_answer_label: "Person 5’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex5:
+ page_header: ""
+ check_answer_label: "Person 5’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 5’s gender identity?"
+
+ ecstat5:
+ page_header: ""
+ check_answer_label: "Person 5’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 5’s working situation?"
+
+ details_known_6:
+ page_header: "You’ve given us the details for 5 people in the household"
+ check_answer_label: "Details known for person 6"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 6?"
+
+ relat6:
+ page_header: ""
+ check_answer_label: "Person 6’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 6’s relationship to the lead tenant?"
+
+ age6:
+ page_header: ""
+ age6_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 6’s age?"
+ age6:
+ check_answer_label: "Person 6’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex6:
+ page_header: ""
+ check_answer_label: "Person 6’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 6’s gender identity?"
+
+ ecstat6:
+ page_header: ""
+ check_answer_label: "Person 6’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 6’s working situation?"
+
+ details_known_7:
+ page_header: "You’ve given us the details for 6 people in the household"
+ check_answer_label: "Details known for person 7"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 7?"
+
+ relat7:
+ page_header: ""
+ check_answer_label: "Person 7’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 7’s relationship to the lead tenant?"
+
+ age7:
+ page_header: ""
+ age7_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 7’s age?"
+ age7:
+ check_answer_label: "Person 7’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex7:
+ page_header: ""
+ check_answer_label: "Person 7’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 7’s gender identity?"
+
+ ecstat7:
+ page_header: ""
+ check_answer_label: "Person 7’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 7’s working situation?"
+
+ details_known_8:
+ page_header: "You’ve given us the details for 7 people in the household"
+ check_answer_label: "Details known for person 8"
+ hint_text: "You must provide details for everyone in the household if you know them."
+ question_text: "Do you know details for person 8?"
+
+ relat8:
+ page_header: ""
+ check_answer_label: "Person 8’s relationship to the lead tenant"
+ hint_text: ""
+ question_text: "What is person 8’s relationship to the lead tenant?"
+
+ age8:
+ page_header: ""
+ age8_known:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Do you know person 8’s age?"
+ age8:
+ check_answer_label: "Person 8’s age"
+ hint_text: "Answer 1 for children aged under 1 year old"
+ question_text: "Age"
+
+ sex8:
+ page_header: ""
+ check_answer_label: "Person 8’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes person 8’s gender identity?"
+
+ ecstat8:
+ page_header: ""
+ check_answer_label: "Person 8’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes person 8’s working situation?"
diff --git a/config/locales/forms/2025/lettings/household_needs.en.yml b/config/locales/forms/2025/lettings/household_needs.en.yml
new file mode 100644
index 000000000..ba63f2031
--- /dev/null
+++ b/config/locales/forms/2025/lettings/household_needs.en.yml
@@ -0,0 +1,57 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ household_needs:
+ armedforces:
+ page_header: ""
+ check_answer_label: "Household links to UK armed forces"
+ hint_text: "This excludes national service.
If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner."
+ question_text: "Does anybody in the household have any links to the UK armed forces?"
+
+ leftreg:
+ page_header: ""
+ check_answer_label: "Person still serving in UK armed forces"
+ hint_text: ""
+ question_text: "Is the person still serving in the UK armed forces?"
+
+ reservist:
+ page_header: ""
+ check_answer_label: "Person seriously injured or ill as result of serving in UK armed forces"
+ hint_text: ""
+ question_text: "Was the person seriously injured or ill as a result of serving in the UK armed forces?"
+
+ preg_occ:
+ page_header: ""
+ check_answer_label: "Anybody in household pregnant"
+ hint_text: ""
+ question_text: "Is anybody in the household pregnant?"
+
+ housingneeds:
+ page_header: ""
+ check_answer_label: "Anybody with disabled access needs"
+ hint_text: ""
+ question_text: "Does anybody in the household have any disabled access needs?"
+
+ housingneeds_type:
+ page_header: "Disabled access needs"
+ housingneeds_type:
+ check_answer_label: "Disabled access needs"
+ hint_text: ""
+ question_text: "What type of access needs do they have?"
+ housingneeds_other:
+ check_answer_label: "Other disabled access needs"
+ hint_text: ""
+ question_text: "Do they have any other disabled access needs?"
+
+ illness:
+ page_header: ""
+ check_answer_label: "Anybody in household with physical or mental health condition"
+ hint_text: ""
+ question_text: "Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?"
+
+ condition_effects:
+ page_header: ""
+ check_answer_label: "How is person affected by condition or illness"
+ hint_text: "Select all that apply."
+ question_text: "How is the person affected by their condition or illness?"
diff --git a/config/locales/forms/2025/lettings/household_situation.en.yml b/config/locales/forms/2025/lettings/household_situation.en.yml
new file mode 100644
index 000000000..2b72c45d0
--- /dev/null
+++ b/config/locales/forms/2025/lettings/household_situation.en.yml
@@ -0,0 +1,120 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ household_situation:
+ layear:
+ page_header: ""
+ check_answer_label: "Length of time in local authority area"
+ hint_text: ""
+ question_text: "How long has the household continuously lived in the local authority area of the new letting?"
+
+ waityear:
+ page_header: ""
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
+
+ reason:
+ reason_for_leaving_last_settled_home_renewal:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: "Length of time on local authority waiting list"
+ hint_text: ""
+ question_text: "How long has the household been on the local authority waiting list for the area of the new letting?"
+ reason_for_leaving_last_settled_home:
+ page_header: ""
+ reason:
+ check_answer_label: "Reason for leaving last settled home"
+ hint_text: "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."
+ question_text: "What is the tenant’s main reason for the household leaving their last settled home?"
+ reasonother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "What is the reason?"
+
+ prevten:
+ renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "You told us this letting is a renewal. We have removed some options because of this.
This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+ not_renewal:
+ page_header: ""
+ check_answer_label: "Where was the household immediately before this letting?"
+ hint_text: "This is where the household was the night before they moved into this new let."
+ question_text: "Where was the household immediately before this letting?"
+
+ homeless:
+ page_header: ""
+ check_answer_label: "Household homeless immediately before letting"
+ hint_text: ""
+ question_text: "Did the household experience homelessness immediately before this letting?"
+
+ previous_postcode:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: ""
+ hint_text: "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."
+ question_text: "Do you know the postcode of the household’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of household’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode for the previous accommodation"
+
+ previous_local_authority:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: ""
+ hint_text: "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."
+ question_text: "Do you know the local authority of the household’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Location of household’s last settled accommodation"
+ hint_text: "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
+ question_text: "Select a local authority"
+
+ reasonpref:
+ page_header: ""
+ check_answer_label: "Household given reasonable preference"
+ hint_text: "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’."
+ question_text: "Was the household given ‘reasonable preference’ by the local authority?"
+
+ reasonable_preference_reason:
+ page_header: ""
+ check_answer_label: "Reason for reasonable preference"
+ hint_text: "Select all that apply."
+ question_text: "Why was the household given ‘reasonable preference’?"
+
+ letting_allocation:
+ page_header: ""
+ check_answer_label: "Allocation system"
+ hint_text: "Select all that apply."
+ question_text: "How was this letting allocated?"
+
+ referral:
+ supported_housing:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: ""
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ general_needs:
+ prp:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
+ la:
+ page_header: ""
+ check_answer_label: "Source of referral for letting"
+ hint_text: "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
+ question_text: "What was the source of referral for this letting?"
diff --git a/config/locales/forms/2025/lettings/income_and_benefits.en.yml b/config/locales/forms/2025/lettings/income_and_benefits.en.yml
new file mode 100644
index 000000000..55e193ff7
--- /dev/null
+++ b/config/locales/forms/2025/lettings/income_and_benefits.en.yml
@@ -0,0 +1,108 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ income_and_benefits:
+ net_income_known:
+ page_header: "Household’s combined income after tax"
+ check_answer_label: "Do you know the household’s combined total income after tax?"
+ hint_text: ""
+ question_text: "Do you know the household’s combined income after tax?"
+
+ income_amount:
+ page_header: "Total household income"
+ incfreq:
+ check_answer_label: "How often does the household receive this amount?"
+ hint_text: ""
+ question_text: "How often does the household receive this amount?"
+ earnings:
+ check_answer_label: "Total household income"
+ hint_text: ""
+ question_text: "How much income does the household have in total?"
+
+ hb:
+ page_header: ""
+ check_answer_label: "Housing-related benefits received"
+ hint_text: "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."
+ question_text: "Is the household likely to be receiving any of these housing-related benefits?"
+
+ benefits:
+ page_header: ""
+ check_answer_label: "Household income from Universal Credit, state pension or benefit"
+ hint_text: "This excludes child and housing benefit, council tax support and tax credits."
+ question_text: "How much of the household’s income is from Universal Credit, state pensions or benefits?"
+
+ household_charge:
+ page_header: ""
+ check_answer_label: "Does the household pay rent or charges"
+ hint_text: "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
+ question_text: "Does the household pay rent or other charges for the accommodation?"
+
+ period:
+ page_header: ""
+ check_answer_label: "Frequency of household rent and charges"
+ hint_text: "Select how often the household is charged. This may be different to how often they pay."
+ question_text: "How often does the household pay rent and other charges?"
+
+ care_home:
+ page_header: ""
+ is_carehome:
+ check_answer_label: "Care home accommodation"
+ hint_text: ""
+ question_text: "Is this accommodation a care home?"
+ chcharge_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every week?"
+ chcharge_bi_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 2 weeks?"
+ chcharge_4_weekly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every 4 weeks?"
+ chcharge_monthly:
+ check_answer_label: "Care home charges"
+ hint_text: ""
+ question_text: "How much does the household pay every month?"
+
+ rent_and_charges:
+ page_header: "Household rent and charges"
+ brent:
+ check_answer_label: "Basic rent"
+ hint_text: "This is the amount paid before any charges are added for services (for example, hot water or cleaning). Households may receive housing benefit or Universal Credit towards basic rent."
+ question_text: "What is the basic rent?"
+ scharge:
+ check_answer_label: "Service charge"
+ hint_text: "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
+ question_text: "What is the service charge?"
+ pscharge:
+ check_answer_label: "Personal service charge"
+ hint_text: "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit."
+ question_text: "What is the personal service charge?"
+ supcharg:
+ check_answer_label: "Support charge"
+ hint_text: "Any charges made to fund support services included in tenancy agreement."
+ question_text: "What is the support charge?"
+ tcharge:
+ check_answer_label: "Household rent and charges"
+ hint_text: "This is the total for rent and all charges."
+ question_text: "Total charge"
+
+ hbrentshortfall:
+ page_header: ""
+ check_answer_label: "Any outstanding amount for basic rent and charges"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "After the household has received any housing-related benefits, will they still need to pay for rent and charges?"
+
+ outstanding_amount:
+ page_header: ""
+ tshortfall_known:
+ check_answer_label: "Do you know the outstanding amount?"
+ hint_text: "You only need to give an approximate figure."
+ question_text: "Can you estimate the outstanding amount?"
+ tshortfall:
+ check_answer_label: "Estimated outstanding amountt"
+ hint_text: "Also known as the ‘outstanding amount’."
+ question_text: "Estimated outstanding amount"
diff --git a/config/locales/forms/2025/lettings/property_information.en.yml b/config/locales/forms/2025/lettings/property_information.en.yml
new file mode 100644
index 000000000..bf3f3532c
--- /dev/null
+++ b/config/locales/forms/2025/lettings/property_information.en.yml
@@ -0,0 +1,127 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ property_information:
+ first_time_property_let_as_social_housing:
+ page_header: ""
+ check_answer_label: "First time being let as social-housing?"
+ hint_text: ""
+ question_text: "Is this the first time the property has been let as social housing?"
+
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address_matcher:
+ page_header: "Find an address"
+ address_line1_input:
+ check_answer_label: "Find address"
+ hint_text: ""
+ question_text: "Address line 1"
+ postcode_full_input:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Postcode"
+
+ uprn_selection:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Select the correct address"
+ hint_text: ""
+ question_text: "Select the correct address"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+
+ unitletas:
+ page_header: ""
+ check_answer_label: "Most recent let type"
+ hint_text: "This is the rent type of the previous tenancy in this property."
+ question_text: "What type was the property most recently let as?"
+
+ rsnvac:
+ page_header: ""
+ check_answer_label: "Vacancy reason"
+ hint_text: ""
+ question_text: "What is the reason for the property being vacant?"
+
+ unittype_gn:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "If shared accommodation, enter the number of bedrooms occupied by this household."
+ question_text: "How many bedrooms does the property have?"
+
+ voiddate:
+ page_header: "Void date"
+ check_answer_label: "Void date"
+ hint_text: ""
+ question_text: "What is the void date?"
+
+ property_major_repairs:
+ page_header: ""
+ majorrepairs:
+ check_answer_label: "Major repairs carried out during void period"
+ hint_text: "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
+ question_text: "Were any major repairs carried out during the void period?"
+ mrcdate:
+ check_answer_label: "Completion date of repairs"
+ hint_text: ""
+ question_text: "When were the repairs completed?"
diff --git a/config/locales/forms/2025/lettings/setup.en.yml b/config/locales/forms/2025/lettings/setup.en.yml
new file mode 100644
index 000000000..029b5e91e
--- /dev/null
+++ b/config/locales/forms/2025/lettings/setup.en.yml
@@ -0,0 +1,87 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ setup:
+ owning_organisation_id:
+ page_header: ""
+ check_answer_label: "Stock owner"
+ hint_text: ""
+ question_text: "Which organisation owns this property?"
+
+ managing_organisation_id:
+ page_header: ""
+ check_answer_label: "Managing agent"
+ hint_text: ""
+ question_text: "Which organisation manages this letting?"
+
+ assigned_to_id:
+ page_header: ""
+ check_answer_label: "Log owner"
+ hint_text: ""
+ question_text: "Which user are you creating this log for?"
+
+ needstype:
+ page_header: ""
+ check_answer_label: "Needs type"
+ hint_text: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
+ question_text: "What is the needs type?"
+
+ scheme_id:
+ page_header: "Scheme"
+ check_answer_label: "Scheme name"
+ hint_text: "Enter postcode or scheme name.
A supported housing scheme provides shared or self-contained housing for a particular client group, for example younger or vulnerable people."
+ question_text: "What scheme is this log for?"
+
+ location_id:
+ less_than_twenty:
+ page_header: "Location"
+ check_answer_label: "Location"
+ hint_text: ""
+ question_text: "Which location is this letting for?"
+ twenty_or_more:
+ page_header: "Location"
+ check_answer_label: "Location"
+ hint_text: 'This scheme has 20 or more locations.
Enter postcode or address.'
+ question_text: "Which location is this letting for?"
+
+ renewal:
+ page_header: ""
+ check_answer_label: "Property renewal"
+ hint_text: "If the property was previously being used as temporary accommodation, then answer 'no'."
+ question_text: "Is this letting a renewal of social housing to the same tenant in the same property?"
+
+ startdate:
+ page_header: ""
+ check_answer_label: "Tenancy start date"
+ hint_text: ""
+ question_text: "What is the tenancy start date?"
+
+ rent_type:
+ page_header: "Rent Type"
+ rent_type:
+ check_answer_label: "Rent type"
+ hint_text: ""
+ question_text: "What is the rent type?"
+ irproduct_other:
+ check_answer_label: "Product name"
+ hint_text: ""
+ question_text: "Name of rent product"
+
+ tenancycode:
+ page_header: ""
+ check_answer_label: "Tenant code"
+ hint_text: "This is how you usually refer to this tenancy on your own systems."
+ question_text: "What is the tenant code?"
+
+ propcode:
+ page_header: ""
+ check_answer_label: "Property reference"
+ hint_text: "This is how you usually refer to this property on your own systems."
+ question_text: "What is the property reference?"
+
+ declaration:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Tenant has seen the privacy notice"
+ hint_text: ""
+ question_text: "Declaration"
diff --git a/config/locales/forms/2025/lettings/tenancy_information.en.yml b/config/locales/forms/2025/lettings/tenancy_information.en.yml
new file mode 100644
index 000000000..3276d1b3d
--- /dev/null
+++ b/config/locales/forms/2025/lettings/tenancy_information.en.yml
@@ -0,0 +1,66 @@
+en:
+ forms:
+ 2025:
+ lettings:
+ tenancy_information:
+ joint:
+ page_header: ""
+ check_answer_label: "Is this a joint tenancy?"
+ hint_text: "This is where two or more people are named on the tenancy agreement"
+ question_text: "Is this a joint tenancy?"
+
+ startertenancy:
+ page_header: ""
+ check_answer_label: "Is this a starter or introductory tenancy?"
+ hint_text: "If the tenancy has an ‘introductory period’ answer ‘yes’.
You should submit a CORE log at the beginning of the starter tenancy or introductory period, with the best information you have at the time. You do not need to submit a log when a tenant later rolls onto the main tenancy."
+ question_text: "Is this a starter tenancy?"
+
+ tenancy:
+ tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy"
+ hint_text: ""
+ question_text: "What is the type of tenancy?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+ starter_tenancy_type:
+ page_header: ""
+ tenancy:
+ check_answer_label: "Type of main tenancy after the starter or introductory period has ended"
+ hint_text: ""
+ question_text: "What is the type of tenancy after the starter or introductory period has ended?"
+ tenancyother:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Please state the tenancy type"
+
+ tenancylength:
+ tenancy_length:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_affordable_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 2 years for social or affordable rent general needs logs. You do not need to submit CORE logs for these types of tenancies if they are shorter than 2 years."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_intermediate_rent:
+ page_header: ""
+ check_answer_label: "Length of fixed-term tenancy"
+ hint_text: "Do not include the starter or introductory period.The minimum period is 1 year for intermediate rent general needs logs. You do not need to submit CORE logs for these types of tenancies if they are shorter than 1 year."
+ question_text: "What is the length of the fixed-term tenancy to the nearest year?"
+ tenancy_length_periodic:
+ page_header: ""
+ check_answer_label: "Length of periodic tenancy"
+ hint_text: "As this is a periodic tenancy, this question is optional. If you do not have the information available click save and continue"
+ question_text: "What is the length of the periodic tenancy to the nearest year?"
+
+ sheltered:
+ page_header: ""
+ check_answer_label: "Is this letting in sheltered accommodation?"
+ hint_text: "Sheltered housing and special retirement housing are for tenants with low-level care and support needs. This typically provides some limited support to enable independent living, such as alarm-based assistance or a scheme manager.Extra care housing is for tenants with medium to high care and support needs, often with 24 hour access to support staff provided by an agency registered with the Care Quality Commission."
+ question_text: "Is this letting in sheltered accommodation?"
diff --git a/config/locales/forms/2025/sales/guidance.en.yml b/config/locales/forms/2025/sales/guidance.en.yml
new file mode 100644
index 000000000..4ed6796b3
--- /dev/null
+++ b/config/locales/forms/2025/sales/guidance.en.yml
@@ -0,0 +1,46 @@
+en:
+ forms:
+ 2025:
+ sales:
+ guidance:
+ shared_ownership_type_definitions:
+ title: "Shared Ownership Type Definitions"
+ content: "Shared Ownership (old model lease): Cannot be used for homes funded through the Affordable Homes Programme 2021 to 2026. Use the new model lease for these properties.
+ Shared Ownership (new model lease): Homes bought using the Affordable Homes Programme 2021 to 2026.
+ Social HomeBuy — shared ownership purchase: Tenants of private registered providers purchase their home at discount on Shared Ownership terms.
+ Home Ownership for people with Long-Term Disabilities (HOLD): A shared ownership sale for those with long term disabilities.
+ Older Persons Shared Ownership: A type of shared ownership for those 55 years and over.
+ Rent to Buy — Shared Ownership: A sale following a period of discounted rent.
+ Right to Shared Ownership (RtSO): A sale of a share of a rented home to a tenant using this scheme.
+ London Living Rent — Shared Ownership: A shared ownership sale following a period of discounted rent as part of the London Living Rent scheme.
"
+
+ discounted_ownership_type_definitions:
+ title: "Discounted Ownership Type Definitions"
+ content: "Right to Acquire (RTA): a discounted sale of a property built or purchased after 31 March 1997 to tenants of a private registered provider.
+ Preserved Right to Buy (PRTB): a discounted sale of a property that used to be owned by a council to tenants of a private registered provider.
+ Voluntary Right to Buy (VRTB): a discounted sale to tenants in this PRP owned property, as part of a pilot scheme.
+ Right to Buy (RTB): a discounted sale to tenants in this council owned property.
+ Rent to Buy full ownership: a sale on full ownership terms following a period of discounted rent.
+ Social HomeBuy for outright purchase: a discounted sale to tenants of a private registered provider on full ownership terms.
+ Any other equity loan scheme: any scheme, not covered elsewhere, in which a loan is used to purchase equity.
"
+
+ mortgage_lender:
+ title: "Can’t find the mortgage lender you’re looking for?"
+ content: "
+ - Double check the spelling and try again
+ - Type the first few letters to see the suggestions
+ - Type Other and continue - we’ll ask you to type in your answer in the next question
+
"
+
+ outright_sale_type_definitions:
+ title: "Outright sale type definitions"
+ content: "Outright sale: the full purchase of a property, usually with a mortgage or cash.
+ Other sale: any sale which does not fit the criteria of any of the remaining options.
"
+
+ privacy_notice_buyer_joint_purchase:
+ content: "Make sure the buyers have seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
+
+ privacy_notice_buyer:
+ content: "Make sure the buyer has seen or been given access to %{privacy_notice_link} before completing this log. This is a legal requirement under data protection legislation."
+ privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice"
diff --git a/config/locales/forms/2025/sales/household_characteristics.en.yml b/config/locales/forms/2025/sales/household_characteristics.en.yml
new file mode 100644
index 000000000..b92cba2de
--- /dev/null
+++ b/config/locales/forms/2025/sales/household_characteristics.en.yml
@@ -0,0 +1,345 @@
+en:
+ forms:
+ 2025:
+ sales:
+ household_characteristics:
+ age1:
+ page_header: ""
+ age1_known:
+ check_answer_label: "Buyer 1’s age"
+ hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest."
+ question_text: "Do you know buyer 1’s age?"
+ age1:
+ check_answer_label: "Buyer 1’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex1:
+ page_header: ""
+ check_answer_label: "Buyer 1’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes buyer 1’s gender identity?"
+
+ ethnic_group:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic group"
+ hint_text: ""
+ question_text: "What is buyer 1’s ethnic group?"
+
+ ethnic:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Buyer 1’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 1’s White background?"
+
+ nationality_all_group:
+ page_header: ""
+ check_answer_label: "Buyer 1’s nationality"
+ hint_text: "If buyer 1 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 buyer should decide which country to enter."
+ question_text: "What is buyer 1’s nationality?"
+
+ nationality_all:
+ page_header: ""
+ check_answer_label: "Buyer 1’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+
+ ecstat1:
+ page_header: ""
+ check_answer_label: "Buyer 1's working situation"
+ hint_text: ""
+ question_text: "Which of these best describes buyer 1's working situation?"
+
+ buy1livein:
+ page_header: ""
+ check_answer_label: "Will buyer 1 live in the property?"
+ hint_text: ""
+ question_text: "Will buyer 1 live in the property?"
+
+ relat2:
+ buyer:
+ page_header: ""
+ check_answer_label: "Buyer 2's relationship to buyer 1"
+ hint_text: ""
+ question_text: "What is buyer 2's relationship to buyer 1?"
+ person:
+ page_header: ""
+ check_answer_label: "Person 2’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 2’s relationship to Buyer 1?"
+
+ age2:
+ buyer:
+ page_header: ""
+ age2_known:
+ check_answer_label: "Buyer 2’s age"
+ hint_text: ""
+ question_text: "Do you know buyer 2’s age?"
+ age2:
+ check_answer_label: "Buyer 2’s age"
+ hint_text: ""
+ question_text: "Age"
+ person:
+ page_header: ""
+ age2_known:
+ check_answer_label: "Person 2’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 2’s age?"
+ age2:
+ check_answer_label: "Person 2’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex2:
+ buyer:
+ page_header: ""
+ check_answer_label: "Buyer 2’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes buyer 2’s gender identity?"
+ person:
+ page_header: ""
+ check_answer_label: "Person 2’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes Person 2’s gender identity?"
+
+ ethnic_group2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic group"
+ hint_text: ""
+ question_text: "What is buyer 2’s ethnic group?"
+
+ ethnicbuy2:
+ ethnic_background_black:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Black, African, Caribbean or Black British background?"
+ ethnic_background_asian:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Asian or Asian British background?"
+ ethnic_background_arab:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Arab background?"
+ ethnic_background_mixed:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s Mixed or Multiple ethnic groups background?"
+ ethnic_background_white:
+ page_header: ""
+ check_answer_label: "Buyer 2’s ethnic background"
+ hint_text: ""
+ question_text: "Which of the following best describes buyer 2’s White background?"
+
+ nationality_all_buyer2_group:
+ page_header: ""
+ check_answer_label: "Buyer 2’s nationality"
+ hint_text: "If buyer 1 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 buyer should decide which country to enter."
+ question_text: "What is buyer 2’s nationality?"
+
+ nationality_all_buyer2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s nationality"
+ hint_text: ""
+ question_text: "Enter a nationality"
+
+ ecstat2:
+ buyer:
+ page_header: ""
+ check_answer_label: "Buyer 2's working situation"
+ hint_text: ""
+ question_text: "Which of these best describes buyer 2's working situation?"
+ person:
+ page_header: ""
+ check_answer_label: "Person 2’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 2’s working situation?"
+
+ buy2livein:
+ page_header: ""
+ check_answer_label: "Will buyer 2 live in the property?"
+ hint_text: ""
+ question_text: "Will buyer 2 live in the property?"
+
+ hholdcount:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Number of other people living in the property"
+ hint_text: "You can provide details for a maximum of 4 other people for a joint purchase."
+ question_text: "Besides the buyers, how many other people live or will live in the property?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Number of other people living in the property"
+ hint_text: "You can provide details for a maximum of 5 other people if there is only one buyer."
+ question_text: "Besides the buyer, how many other people live or will live in the property?"
+
+ details_known_2:
+ page_header: ""
+ check_answer_label: "Details known for person 2?"
+ hint_text: ""
+ question_text: "Do you know the details for person 2?"
+
+ details_known_3:
+ page_header: ""
+ check_answer_label: "Details known for person 3?"
+ hint_text: ""
+ question_text: "Do you know the details for person 3?"
+
+ relat3:
+ page_header: ""
+ check_answer_label: "Person 3’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 3’s relationship to Buyer 1?"
+
+ age3:
+ page_header: ""
+ age3_known:
+ check_answer_label: "Person 3’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 3’s age?"
+ age3:
+ check_answer_label: "Person 3’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex3:
+ page_header: ""
+ check_answer_label: "Person 3’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes Person 3’s gender identity?"
+
+ ecstat3:
+ page_header: ""
+ check_answer_label: "Person 3’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 3’s working situation?"
+
+ details_known_4:
+ page_header: ""
+ check_answer_label: "Details known for person 4?"
+ hint_text: ""
+ question_text: "Do you know the details for person 4?"
+
+ relat4:
+ page_header: ""
+ check_answer_label: "Person 4’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 4’s relationship to Buyer 1?"
+
+ age4:
+ page_header: ""
+ age4_known:
+ check_answer_label: "Person 4’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 4’s age?"
+ age4:
+ check_answer_label: "Person 4’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex4:
+ page_header: ""
+ check_answer_label: "Person 4’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes Person 4’s gender identity?"
+
+ ecstat4:
+ page_header: ""
+ check_answer_label: "Person 4’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 4’s working situation?"
+
+ details_known_5:
+ page_header: ""
+ check_answer_label: "Details known for person 5?"
+ hint_text: ""
+ question_text: "Do you know the details for person 5?"
+
+ relat5:
+ page_header: ""
+ check_answer_label: "Person 5’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 5’s relationship to Buyer 1?"
+
+ age5:
+ page_header: ""
+ age5_known:
+ check_answer_label: "Person 5’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 5’s age?"
+ age5:
+ check_answer_label: "Person 5’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex5:
+ page_header: ""
+ check_answer_label: "Person 5’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes Person 5’s gender identity?"
+
+ ecstat5:
+ page_header: ""
+ check_answer_label: "Person 5’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 5’s working situation?"
+
+ details_known_6:
+ page_header: ""
+ check_answer_label: "Details known for person 6?"
+ hint_text: ""
+ question_text: "Do you know the details for person 6?"
+
+ relat6:
+ page_header: ""
+ check_answer_label: "Person 6’s relationship to Buyer 1"
+ hint_text: ""
+ question_text: "What is Person 6’s relationship to Buyer 1?"
+
+ age6:
+ page_header: ""
+ age6_known:
+ check_answer_label: "Person 6’s age known?"
+ hint_text: ""
+ question_text: "Do you know person 6’s age?"
+ age6:
+ check_answer_label: "Person 6’s age"
+ hint_text: ""
+ question_text: "Age"
+
+ sex6:
+ page_header: ""
+ check_answer_label: "Person 6’s gender identity"
+ hint_text: "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."
+ question_text: "Which of these best describes Person 6’s gender identity?"
+
+ ecstat6:
+ page_header: ""
+ check_answer_label: "Person 6’s working situation"
+ hint_text: ""
+ question_text: "Which of these best describes Person 6’s working situation?"
diff --git a/config/locales/forms/2025/sales/household_needs.en.yml b/config/locales/forms/2025/sales/household_needs.en.yml
new file mode 100644
index 000000000..1908ba6ca
--- /dev/null
+++ b/config/locales/forms/2025/sales/household_needs.en.yml
@@ -0,0 +1,34 @@
+en:
+ forms:
+ 2025:
+ sales:
+ household_needs:
+ hhregres:
+ page_header: ""
+ check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"
+ hint_text: "A regular is somebody who has served in the Royal Navy, the Royal Marines, the Royal Airforce or Army full time and does not include reserve forces"
+ question_text: "Have any of the buyers ever served as a regular in the UK armed forces?"
+
+ hhregresstill:
+ page_header: ""
+ check_answer_label: "Are they still serving in the UK armed forces?"
+ hint_text: ""
+ question_text: "Is the buyer still serving in the UK armed forces?"
+
+ armedforcesspouse:
+ page_header: ""
+ check_answer_label: "Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
+ hint_text: ""
+ question_text: "Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?"
+
+ disabled:
+ page_header: ""
+ check_answer_label: "Does anyone in the household have a disability?"
+ hint_text: "This includes any long-term health condition that has an impact on the person's day-to-day life"
+ question_text: "Does anyone in the household consider themselves to have a disability?"
+
+ wheel:
+ page_header: ""
+ check_answer_label: "Does anyone in the household use a wheelchair?"
+ hint_text: "This can be inside or outside the home"
+ question_text: "Does anyone in the household use a wheelchair?"
diff --git a/config/locales/forms/2025/sales/household_situation.en.yml b/config/locales/forms/2025/sales/household_situation.en.yml
new file mode 100644
index 000000000..3aa3545d8
--- /dev/null
+++ b/config/locales/forms/2025/sales/household_situation.en.yml
@@ -0,0 +1,50 @@
+en:
+ forms:
+ 2025:
+ sales:
+ household_situation:
+ prevten:
+ page_header: ""
+ check_answer_label: "Buyer 1’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 1’s previous tenure?"
+
+ last_accommodation:
+ page_header: ""
+ ppcodenk:
+ check_answer_label: "Buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the postcode of buyer 1’s last settled accommodation?"
+ ppostcode_full:
+ check_answer_label: "Postcode of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Postcode"
+
+ last_accommodation_la:
+ page_header: ""
+ previous_la_known:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: "This is also known as the household’s 'last settled home'"
+ question_text: "Do you know the local authority of buyer 1’s last settled accommodation?"
+ prevloc:
+ check_answer_label: "Local authority of buyer 1’s last settled accommodation"
+ hint_text: ""
+ question_text: "Select a local authority"
+
+ buyers_organisations:
+ page_header: ""
+ check_answer_label: "Organisations buyers were registered with"
+ hint_text: "Select all that apply. This question is optional. If no options are applicable, leave the options blank, and select save and continue."
+ question_text: "What organisations were the buyers registered with?"
+
+ buy2living:
+ page_header: ""
+ check_answer_label: "Buyer 2 living at the same address"
+ hint_text: ""
+ question_text: "At the time of purchase, was buyer 2 living at the same address as buyer 1?"
+
+ prevtenbuy2:
+ page_header: ""
+ check_answer_label: "Buyer 2’s previous tenure"
+ hint_text: ""
+ question_text: "What was buyer 2’s previous tenure?"
diff --git a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml
new file mode 100644
index 000000000..20beb0b85
--- /dev/null
+++ b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml
@@ -0,0 +1,90 @@
+en:
+ forms:
+ 2025:
+ sales:
+ income_benefits_and_savings:
+ buyer_1_income:
+ page_header: ""
+ income1nk:
+ check_answer_label: "Buyer 1’s gross annual income known?"
+ hint_text: ""
+ question_text: "Do you know buyer 1’s annual income?"
+ income1:
+ check_answer_label: "Buyer 1’s gross annual income"
+ hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments."
+ question_text: "Buyer 1’s gross annual income"
+
+ inc1mort:
+ page_header: ""
+ check_answer_label: "Buyer 1’s income used for mortgage application"
+ hint_text: ""
+ question_text: "Was buyer 1’s income used for a mortgage application?"
+
+ buyer_2_income:
+ page_header: ""
+ income2nk:
+ check_answer_label: "Buyer 2’s gross annual income known?"
+ hint_text: ""
+ question_text: "Do you know buyer 2’s annual income?"
+ income2:
+ check_answer_label: "Buyer 2’s gross annual income"
+ hint_text: "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments."
+ question_text: "Buyer 2’s gross annual income"
+
+ inc2mort:
+ page_header: ""
+ check_answer_label: "Buyer 2’s income used for mortgage application"
+ hint_text: ""
+ question_text: "Was buyer 2’s income used for a mortgage application?"
+
+ housing_benefits:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Housing-related benefits buyers received before buying this property"
+ hint_text: ""
+ question_text: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Housing-related benefits buyer received before buying this property"
+ hint_text: ""
+ question_text: "Was the buyer receiving any of these housing-related benefits immediately before buying this property?"
+
+ savings:
+ joint_purchase:
+ page_header: ""
+ savingsnk:
+ check_answer_label: "Buyers’ total savings known?"
+ hint_text: ""
+ question_text: "Do you know how much the 'buyers' had in savings before they paid any deposit for the property?"
+ savings:
+ check_answer_label: "Buyers’ total savings before any deposit paid"
+ hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account."
+ question_text: "Enter their total savings to the nearest £10"
+ not_joint_purchase:
+ page_header: ""
+ savingsnk:
+ check_answer_label: "Buyer’s total savings known?"
+ hint_text: ""
+ question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?"
+ savings:
+ check_answer_label: "Buyer’s total savings before any deposit paid"
+ hint_text: "Include any savings, investments, ISAs, premium bonds, shares, or money held in a bank or building society account."
+ question_text: "Enter their total savings to the nearest £10"
+
+ prevown:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyers previously owned a property."
+ hint_text: ""
+ question_text: "Have any of the buyers previously owned a property?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer previously owned a property."
+ hint_text: ""
+ question_text: "Has the buyer previously owned a property?"
+
+ prevshared:
+ page_header: ""
+ check_answer_label: "Previous property shared ownership?"
+ hint_text: "For any buyer"
+ question_text: "Was the previous property under shared ownership?"
diff --git a/config/locales/forms/2025/sales/property_information.en.yml b/config/locales/forms/2025/sales/property_information.en.yml
new file mode 100644
index 000000000..240c96f09
--- /dev/null
+++ b/config/locales/forms/2025/sales/property_information.en.yml
@@ -0,0 +1,91 @@
+en:
+ forms:
+ 2025:
+ sales:
+ property_information:
+ uprn:
+ page_header: ""
+ uprn_known:
+ check_answer_label: "UPRN known?"
+ hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.
The UPRN may not be the same as the property reference assigned by your organisation.
If you don’t know the UPRN you can enter the address of the property instead on the next screen."
+ question_text: "Do you know the property's UPRN?"
+ uprn:
+ check_answer_label: "UPRN"
+ hint_text: ""
+ question_text: "What is the property's UPRN?"
+
+ uprn_confirmed:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Is this the right address?"
+ hint_text: ""
+ question_text: "Is this the property address?"
+
+ address_matcher:
+ page_header: "Find an address"
+ address_line1_input:
+ check_answer_label: "Find address"
+ hint_text: ""
+ question_text: "Address line 1"
+ postcode_full_input:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Postcode"
+
+ uprn_selection:
+ page_header: "We found an address that might be this property"
+ check_answer_label: "Select the correct address"
+ hint_text: ""
+ question_text: "Select the correct address"
+
+ address:
+ page_header: "Q12 - What is the property's address?"
+ address_line1:
+ check_answer_label: "Address lines 1 and 2"
+ hint_text: ""
+ question_text: "Address line 1"
+ address_line2:
+ check_answer_label: ""
+ hint_text: ""
+ question_text: "Address line 2 (optional)"
+ town_or_city:
+ check_answer_label: "Town or city"
+ hint_text: ""
+ question_text: "Town or city"
+ county:
+ check_answer_label: "County"
+ hint_text: ""
+ question_text: "County (optional)"
+ postcode_full:
+ check_answer_label: "Postcode"
+ hint_text: ""
+ question_text: "Postcode"
+
+ la:
+ page_header: ""
+ check_answer_label: "Local authority"
+ hint_text: ""
+ question_text: "What is the property’s local authority?"
+
+ beds:
+ page_header: ""
+ check_answer_label: "Number of bedrooms"
+ hint_text: "A bedsit has 1 bedroom."
+ question_text: "How many bedrooms does the property have?"
+
+ proptype:
+ page_header: ""
+ check_answer_label: "Type of unit"
+ hint_text: ""
+ question_text: "What type of unit is the property?"
+
+ builtype:
+ page_header: ""
+ check_answer_label: "Type of building"
+ hint_text: ""
+ question_text: "What type of building is the property?"
+
+ wchair:
+ page_header: ""
+ check_answer_label: "Property built or adapted to wheelchair-user standards"
+ hint_text: "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property."
+ question_text: "Is the property built or adapted to wheelchair-user standards?"
diff --git a/config/locales/forms/2025/sales/sale_information.en.yml b/config/locales/forms/2025/sales/sale_information.en.yml
new file mode 100644
index 000000000..51270a92e
--- /dev/null
+++ b/config/locales/forms/2025/sales/sale_information.en.yml
@@ -0,0 +1,206 @@
+en:
+ forms:
+ 2025:
+ sales:
+ sale_information:
+ living_before_purchase:
+ joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyers lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyers live in the property before purchasing it?"
+ not_joint_purchase:
+ page_header: ""
+ proplen:
+ check_answer_label: "Number of years living in the property before purchase"
+ hint_text: "You should round up to the nearest year"
+ question_text: "How long did they live there?"
+ proplen_asked:
+ check_answer_label: "Buyer lived in the property before purchasing"
+ hint_text: ""
+ question_text: "Did the buyer live in the property before purchasing it?"
+
+ staircasing:
+ page_header: ""
+ check_answer_label: "Staircasing transaction"
+ hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
+ question_text: "Is this a staircasing transaction?"
+ about_staircasing:
+ page_header: "About the staircasing transaction"
+ stairbought:
+ check_answer_label: "Percentage bought in this staircasing transaction"
+ hint_text: ""
+ question_text: "What percentage of the property has been bought in this staircasing transaction?"
+ stairowned:
+ joint_purchase:
+ check_answer_label: "Percentage the buyers now own in total"
+ hint_text: ""
+ question_text: "What percentage of the property do the buyers now own in total?"
+ not_joint_purchase:
+ check_answer_label: "Percentage the buyer now owns in total"
+ hint_text: ""
+ question_text: "What percentage of the property does the buyer now own in total?"
+ staircasesale:
+ check_answer_label: "Part of a back-to-back staircasing transaction"
+ hint_text: ""
+ question_text: "Is this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market?"
+
+ resale:
+ page_header: ""
+ check_answer_label: "Is this a resale?"
+ hint_text: "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
+ question_text: "Is this a resale?"
+
+ exchange_date:
+ page_header: ""
+ check_answer_label: "Exchange of contracts date"
+ hint_text: ""
+ question_text: "What is the exchange of contracts date?"
+
+ handover_date:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date"
+ hint_text: "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
+ question_text: "What is the practical completion or handover date?"
+
+ la_nominations:
+ page_header: ""
+ check_answer_label: "Household rehoused under a local authority nominations agreement?"
+ hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
+ question_text: "Was the household rehoused under a 'local authority nominations agreement'?"
+
+ soctenant:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
+ hint_text: ""
+ question_text: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
+ hint_text: ""
+ question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
+
+ frombeds:
+ page_header: "About the buyers’ previous property"
+ check_answer_label: "Number of bedrooms in previous property"
+ hint_text: "For bedsits enter 1"
+ question_text: "How many bedrooms did the property have?"
+
+ fromprop:
+ page_header: ""
+ check_answer_label: "Previous property type"
+ hint_text: ""
+ question_text: "What was the previous property type?"
+
+ socprevten:
+ page_header: ""
+ check_answer_label: "Previous property tenure"
+ hint_text: ""
+ question_text: "What was the previous tenure of the buyer?"
+
+ value:
+ page_header: "About the price of the property"
+ check_answer_label: "Full purchase price"
+ hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
+ question_text: "What was the full purchase price?"
+
+ equity:
+ page_header: "About the price of the property"
+ check_answer_label: "Initial percentage equity stake"
+ hint_text: "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
+ question_text: "What was the initial percentage equity stake purchased?"
+
+ mortgageused:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage used"
+ hint_text: ""
+ question_text: "Was a mortgage used for the purchase of this property?"
+
+ mortgage:
+ page_header: "Mortgage Amount"
+ check_answer_label: "Mortgage amount"
+ hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
+ question_text: "What is the mortgage amount?"
+
+ mortgagelender:
+ page_header: ""
+ check_answer_label: "Mortgage lender"
+ hint_text: ""
+ question_text: "What is the name of the mortgage lender?"
+
+ mortgagelenderother:
+ page_header: ""
+ check_answer_label: "Other Mortgage Lender"
+ hint_text: ""
+ question_text: "What is the other mortgage lender?"
+
+ mortlen:
+ page_header: ""
+ check_answer_label: "Length of mortgage"
+ hint_text: "You should round up to the nearest year. Value should not exceed 60 years."
+ question_text: "What is the length of the mortgage?"
+
+ extrabor:
+ page_header: ""
+ check_answer_label: "Any other borrowing?"
+ hint_text: ""
+ question_text: "Does this include any extra borrowing?"
+
+ deposit:
+ page_header: "About the deposit"
+ check_answer_label: "Deposit amount"
+ hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue"
+ question_text: "How much cash deposit was paid on the property?"
+
+ cashdis:
+ page_header: "About the deposit"
+ check_answer_label: "Cash discount through SocialHomeBuy"
+ hint_text: "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
+ question_text: "How much cash discount was given through Social HomeBuy?"
+
+ mrent:
+ page_header: ""
+ check_answer_label: "Monthly rent"
+ hint_text: "Amount paid before any charges"
+ question_text: "What is the basic monthly rent?"
+
+ leaseholdcharges:
+ page_header: ""
+ has_mscharge:
+ check_answer_label: "Does the property have any monthly leasehold charges?"
+ hint_text: "For example, service and management charges"
+ question_text: "Does the property have any monthly leasehold charges?"
+ mscharge:
+ check_answer_label: "Monthly leasehold charges"
+ hint_text: ""
+ question_text: "Enter the total monthly charge"
+
+ purchase_price:
+ discounted_ownership:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: "For all schemes, including Right to Acquire (RTA), Right to Buy (RTB), Voluntary Right to Buy (VRTB) or Preserved Right to Buy (PRTB) sales, enter the full price of the property without any discount"
+ question_text: "What is the full purchase price?"
+ outright_sale:
+ page_header: "About the price of the property"
+ check_answer_label: "Purchase price"
+ hint_text: ""
+ question_text: "What is the full purchase price?"
+
+ discount:
+ page_header: "About the price of the property"
+ check_answer_label: "Percentage discount"
+ hint_text: "For Right to Buy (RTB), Preserved Right to Buy (PRTB), and Voluntary Right to Buy (VRTB)If discount capped, enter capped %If the property is being sold to an existing tenant under the RTB, PRTB, or VRTB schemes, enter the % discount from the full market value that is being given."
+ question_text: "What was the percentage discount?"
+
+ grant:
+ page_header: "About the price of the property"
+ check_answer_label: "Amount of any loan, grant or subsidy"
+ hint_text: "For all schemes except Right to Buy (RTB), Preserved Right to Buy (PRTB), Voluntary Right to Buy (VRTB) and Rent to Buy"
+ question_text: "What was the amount of any loan, grant, discount or subsidy given?"
diff --git a/config/locales/forms/2025/sales/setup.en.yml b/config/locales/forms/2025/sales/setup.en.yml
new file mode 100644
index 000000000..4f00ab0c2
--- /dev/null
+++ b/config/locales/forms/2025/sales/setup.en.yml
@@ -0,0 +1,110 @@
+en:
+ forms:
+ 2025:
+ sales:
+ setup:
+ owning_organisation_id:
+ page_header: ""
+ check_answer_label: "Owning organisation"
+ hint_text: ""
+ question_text: "Which organisation owns this log?"
+
+ managing_organisation_id:
+ page_header: ""
+ check_answer_label: "Reported by"
+ hint_text: ""
+ question_text: "Which organisation is reporting this sale?"
+
+ assigned_to_id:
+ page_header: ""
+ check_answer_label: "Log owner"
+ hint_text: ""
+ question_text: "Which user are you creating this log for?"
+
+ saledate:
+ page_header: ""
+ check_answer_label: "Sale completion date"
+ hint_text: ""
+ question_text: "What is the sale completion date?"
+
+ purchid:
+ page_header: ""
+ check_answer_label: "Purchaser code"
+ hint_text: "This is how you usually refer to the purchaser on your own systems."
+ question_text: "What is the purchaser code?"
+
+ ownershipsch:
+ page_header: ""
+ check_answer_label: "Purchase made under ownership scheme"
+ hint_text: ""
+ question_text: "Was this purchase made through an ownership scheme?"
+
+ type:
+ shared_ownership:
+ page_header: "Type of shared ownership sale"
+ check_answer_label: "Type of shared ownership sale"
+ hint_text: "When the purchaser buys an initial share of up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion, or a subsequent staircasing transaction"
+ question_text: "What is the type of shared ownership sale?"
+ discounted_ownership:
+ page_header: "Type of discounted ownership sale"
+ check_answer_label: "Type of discounted ownership sale"
+ hint_text: ""
+ question_text: "What is the type of discounted ownership sale?"
+ outright_ownership:
+ page_header: "Type of outright sale"
+ type:
+ check_answer_label: "Type of outright sale"
+ hint_text: ""
+ question_text: "What is the type of outright sale?"
+ othtype:
+ check_answer_label: "Type of other sale"
+ hint_text: ""
+ question_text: "What type of sale is it?"
+
+ companybuy:
+ page_header: ""
+ check_answer_label: "Company buyer"
+ hint_text: ""
+ question_text: "Is the buyer a company?"
+
+ buylivein:
+ page_header: ""
+ check_answer_label: "Buyers living in property"
+ hint_text: ""
+ question_text: "Will any buyers live in the property?"
+
+ jointpur:
+ page_header: ""
+ check_answer_label: "Joint purchase"
+ hint_text: "This is where two or more people are named as legal owners of the property after the purchase"
+ question_text: "Is this a joint purchase?"
+
+ jointmore:
+ page_header: ""
+ check_answer_label: "More than 2 joint buyers"
+ hint_text: ""
+ question_text: "Are there more than 2 joint buyers of this property?"
+
+ noint:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyers interviewed in person?"
+ hint_text: "You should still try to answer all questions even if the buyers weren’t interviewed in person"
+ question_text: "Were the buyers interviewed for any of the answers you will provide on this log?"
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Buyer interviewed in person?"
+ hint_text: "You should still try to answer all questions even if the buyer wasn’t interviewed in person"
+ question_text: "Was the buyer interviewed for any of the answers you will provide on this log?"
+
+ privacynotice:
+ joint_purchase:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Buyers have seen the privacy notice?"
+ hint_text: ""
+ question_text: "Declaration"
+ not_joint_purchase:
+ page_header: "Ministry of Housing, Communities and Local Government privacy notice"
+ check_answer_label: "Buyer has seen the privacy notice?"
+ hint_text: ""
+ question_text: "Declaration"
diff --git a/config/locales/forms/2025/sales/soft_validations.en.yml b/config/locales/forms/2025/sales/soft_validations.en.yml
new file mode 100644
index 000000000..c8f0990ba
--- /dev/null
+++ b/config/locales/forms/2025/sales/soft_validations.en.yml
@@ -0,0 +1,244 @@
+en:
+ forms:
+ 2025:
+ sales:
+ soft_validations:
+ retirement_value_check:
+ max:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person isn't retired?"
+ title_text: "You told us this person is over 66 and not retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+ min:
+ page_header: ""
+ check_answer_label: "Retirement confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is retired?"
+ title_text: "You told us this person is aged %{age} years and retired."
+ informative_text: "The minimum expected retirement age in England is 66."
+ old_persons_shared_ownership_value_check:
+ page_header: ""
+ check_answer_label: "Shared ownership confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text:
+ joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
+ not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
+ informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
+ income1_value_check:
+ check_answer_label: "Buyer 1 income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ min:
+ page_header: ""
+ title_text: "You told us income was %{income}."
+ informative_text: "This is less than we would expect for someone in this working situation."
+ max:
+ page_header: ""
+ title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?"
+
+ income2_value_check:
+ check_answer_label: "Buyer 2 income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ min:
+ page_header: ""
+ title_text: "You told us income was %{income}."
+ informative_text: "This is less than we would expect for someone in this working situation."
+ max:
+ page_header: ""
+ title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?"
+
+ combined_income_value_check:
+ page_header: ""
+ check_answer_label: "Combined income confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us the combined income of this household is %{combined_income}. This seems high. Are you sure this is correct?"
+
+ mortgage_value_check:
+ page_header: ""
+ check_answer_label: "Mortgage confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the mortgage is more than 5 times the income used for the mortgage application?"
+ title_text: "You told us that the mortgage amount is %{mortgage}."
+ informative_text: "This is more than 5 times the income, which is higher than we would expect."
+
+ savings_value_check:
+ page_header: ""
+ check_answer_label: "Savings confirmation"
+ hint_text: ""
+ question_text: "Are you sure the savings are higher than £100,000?"
+ joint_purchase:
+ title_text: "You told us the buyers’ savings were %{savings}."
+ informative_text: "This is higher than we would expect."
+ not_joint_purchase:
+ title_text: "You told us the buyer’s savings were %{savings}."
+ informative_text: "This is higher than we would expect."
+
+ staircase_bought_value_check:
+ page_header: ""
+ check_answer_label: "Percentage bought confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
+ informative_text: "Most staircasing transactions are less than 50%"
+
+ stairowned_value_check:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyers now own %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Percentage owned confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us that the buyer now owns %{stairowned} of the property."
+ informative_text: "The maximum percentage that can be owned under the Older Persons Shared Ownership scheme is 75%, unless the property was funded outside the Affordable Homes Programme. Make sure these answers are correct."
+
+ hodate_check:
+ page_header: ""
+ check_answer_label: "Practical completion or handover date check"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us practical completion or handover date is more than 3 years before sale completion date."
+
+ value_value_check:
+ page_header: ""
+ check_answer_label: "Purchase price confirmation"
+ hint_text: ""
+ question_text: "Are you sure?"
+ title_text: "You told us the purchase price is %{value}."
+ informative_text: "This is %{higher_or_lower} than we would expect."
+
+ shared_ownership_deposit_value_check:
+ page_header: ""
+ check_answer_label: "Shared ownership deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}."
+
+ deposit_value_check:
+ joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
+ title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}."
+ informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
+ not_joint_purchase:
+ page_header: ""
+ check_answer_label: "Deposit confirmation"
+ hint_text: ""
+ question_text: "Are you sure that the deposit is this much higher than the buyer's savings?"
+ title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}."
+ informative_text: "The deposit amount is higher than we would expect for the amount of savings they have."
+
+ address_search_value_check:
+ page_header: ""
+ check_answer_label: ""
+ hint_text: ""
+ question_text: ""
+ title_text: "No address found."
+ informative_text: "We could not find an address that matches your search. You can search again or continue to enter the address manually."
+
+ wheel_value_check:
+ page_header: ""
+ check_answer_label: "Does anyone in the household use a wheelchair?"
+ hint_text: ""
+ question_text: "You told us that someone in the household uses a wheelchair."
+ title_text: "You told us that someone in the household uses a wheelchair."
+
+ buyer_livein_value_check:
+ buyer1:
+ page_header: ""
+ check_answer_label: "Buyer live in confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that buyer 1 will not live in the property."
+ informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
+ buyer2:
+ page_header: ""
+ check_answer_label: "Buyer live in confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that buyer 2 will not live in the property."
+ informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
+
+ student_not_child_value_check:
+ page_header: ""
+ check_answer_label: "Student not a child confirmation"
+ hint_text: ""
+ question_text: "Are you sure this person is not a child?"
+ title_text: "You told us this person is a student aged between 16 and 19."
+ informative_text: "Are you sure this person is not a child?"
+
+ partner_under_16_value_check:
+ page_header: ""
+ check_answer_label: "Partner under 16 confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
+ informative_text: "Are you sure this is correct?"
+
+ multiple_partners_value_check:
+ page_header: ""
+ check_answer_label: "Multiple partners confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."
+ informative_text: "Are you sure this is correct?"
+
+ monthly_charges_value_check:
+ page_header: ""
+ check_answer_label: "Monthly charges confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the monthly charges were %{mscharge}."
+ informative_text: "This is higher than we would expect."
+
+ extra_borrowing_value_check:
+ page_header: ""
+ check_answer_label: "Extra borrowing confirmation"
+ hint_text: ""
+ question_text: "Are you sure there is no extra borrowing?"
+ title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}."
+ informative_text: "This is higher than the purchase price minus the discount."
+
+ percentage_discount_value_check:
+ page_header: ""
+ check_answer_label: "Percentage discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "You told us that the percentage discount is %{discount}."
+ informative_text: "This is higher than we would expect."
+
+ grant_value_check:
+ page_header: ""
+ check_answer_label: "Grant value confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Grants are usually £9,000 - £16,000"
+ title_text: "You told us that the grant amount is %{grant}."
+ informative_text: "Loans, grants and subsidies are usually between £9,000 and £16,000."
+
+ discounted_sale_value_check:
+ page_header: ""
+ check_answer_label: "Discounted sale value confirmation"
+ hint_text: ""
+ question_text: "Are you sure this is correct?"
+ title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}."
+ informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}."
+
+ deposit_and_mortgage_value_check:
+ page_header: ""
+ check_answer_label: "Deposit and mortgage against discount confirmation"
+ hint_text: ""
+ question_text: "Are you sure? Mortgage and deposit usually equal or are more than (value - discount)"
+ title_text: "You told us the mortgage amount was %{mortgage}, the cash deposit was %{deposit} and the discount was %{discount}."
+ informative_text: "We would expect the mortgage amount and the deposit added together to be the same as the purchase price minus the discount."
diff --git a/spec/helpers/filters_helper_spec.rb b/spec/helpers/filters_helper_spec.rb
index b709a16ac..ce60d07f7 100644
--- a/spec/helpers/filters_helper_spec.rb
+++ b/spec/helpers/filters_helper_spec.rb
@@ -517,12 +517,46 @@ RSpec.describe FiltersHelper do
allow(Time).to receive(:now).and_return(Time.zone.local(2024, 5, 1))
end
- it "has the correct options" do
- expect(collection_year_options).to eq(
- {
- "2024" => "2024 to 2025", "2023" => "2023 to 2024", "2022" => "2022 to 2023"
- },
- )
+ context "and in crossover period" do
+ before do
+ allow(FormHandler.instance).to receive(:in_crossover_period?).and_return(true)
+ end
+
+ it "has the correct options" do
+ expect(collection_year_options).to eq(
+ {
+ "2024" => "2024 to 2025", "2023" => "2023 to 2024", "2022" => "2022 to 2023"
+ },
+ )
+ end
+ end
+
+ context "and not in crossover period" do
+ before do
+ allow(FormHandler.instance).to receive(:in_crossover_period?).and_return(false)
+ end
+
+ it "has the correct options" do
+ expect(collection_year_options).to eq(
+ {
+ "2024" => "2024 to 2025", "2023" => "2023 to 2024"
+ },
+ )
+ end
+
+ context "with future form use turned on" do
+ before do
+ allow(FeatureToggle).to receive(:allow_future_form_use?).and_return(true)
+ end
+
+ it "includes next year in the options" do
+ expect(collection_year_options).to eq(
+ {
+ "2025" => "2025 to 2026", "2024" => "2024 to 2025", "2023" => "2023 to 2024"
+ },
+ )
+ end
+ end
end
end
end
From 6fb29ade6bd434cc130c5ec558ee8fa37676da30 Mon Sep 17 00:00:00 2001
From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com>
Date: Thu, 7 Nov 2024 15:54:42 +0000
Subject: [PATCH 3/3] CLDC-3712: Sales Form Updates (#2756)
---
.../lettings_log_variables.rb | 4 +-
.../derived_variables/sales_log_variables.rb | 4 +-
app/models/form.rb | 6 +-
.../lettings/pages/lead_tenant_nationality.rb | 4 +-
.../pages/property_local_authority.rb | 4 +-
app/models/form/lettings/pages/uprn.rb | 4 +-
app/models/form/lettings/questions/age.rb | 2 +-
.../form/lettings/questions/declaration.rb | 6 +-
.../form/lettings/questions/ethnic_white.rb | 2 +-
...rst_time_property_let_as_social_housing.rb | 4 +-
.../lettings/questions/housingneeds_other.rb | 2 +-
.../form/lettings/questions/is_carehome.rb | 2 +-
app/models/form/lettings/questions/layear.rb | 2 +-
.../lettings/questions/letting_allocation.rb | 2 +-
.../lettings/questions/person_relationship.rb | 2 +-
.../lettings/questions/previous_let_type.rb | 2 +-
app/models/form/lettings/questions/reason.rb | 2 +-
.../form/lettings/questions/reason_renewal.rb | 2 +-
.../form/lettings/questions/referral.rb | 2 +-
.../form/lettings/questions/referral_prp.rb | 2 +-
.../questions/referral_supported_housing.rb | 2 +-
.../referral_supported_housing_prp.rb | 2 +-
.../form/lettings/questions/rent_type.rb | 2 +-
app/models/form/lettings/questions/rsnvac.rb | 2 +-
.../form/lettings/questions/sheltered.rb | 2 +-
.../questions/starter_tenancy_type.rb | 2 +-
.../form/lettings/questions/tenancy_type.rb | 2 +-
.../lettings/questions/uprn_confirmation.rb | 2 +-
.../form/lettings/questions/waityear.rb | 2 +-
.../subsections/household_characteristics.rb | 44 ++++++-------
.../subsections/household_situation.rb | 2 +-
.../subsections/property_information.rb | 4 +-
app/models/form/lettings/subsections/setup.rb | 2 +-
.../subsections/tenancy_information.rb | 2 +-
.../form/sales/pages/buyer1_nationality.rb | 2 +-
.../form/sales/pages/buyer2_nationality.rb | 2 +-
app/models/form/sales/pages/buyer_previous.rb | 2 +-
app/models/form/sales/pages/deposit.rb | 2 +-
.../form/sales/pages/deposit_discount.rb | 2 +-
app/models/form/sales/pages/la_nominations.rb | 2 +-
.../form/sales/pages/last_accommodation.rb | 2 +-
.../form/sales/pages/last_accommodation_la.rb | 2 +-
.../form/sales/pages/managing_organisation.rb | 2 +-
.../sales/pages/property_local_authority.rb | 4 +-
app/models/form/sales/pages/uprn.rb | 4 +-
.../buyer1_ethnic_background_white.rb | 2 +-
.../buyer2_ethnic_background_white.rb | 2 +-
.../buyer2_relationship_to_buyer1.rb | 2 +-
.../form/sales/questions/buyer_previous.rb | 2 +-
app/models/form/sales/questions/discount.rb | 2 +-
.../form/sales/questions/mortgage_lender.rb | 2 +-
.../form/sales/questions/mortgageused.rb | 2 +-
.../form/sales/questions/ownership_scheme.rb | 2 +-
.../person_relationship_to_buyer_1.rb | 2 +-
.../form/sales/questions/privacy_notice.rb | 4 +-
.../form/sales/questions/uprn_confirmation.rb | 2 +-
.../subsections/household_characteristics.rb | 66 +++++++++----------
.../form/sales/subsections/outright_sale.rb | 4 +-
.../sales/subsections/property_information.rb | 2 +-
app/models/form/sales/subsections/setup.rb | 8 +--
.../subsections/shared_ownership_scheme.rb | 4 +-
app/models/lettings_log.rb | 4 +-
app/models/sales_log.rb | 6 +-
.../validations/household_validations.rb | 10 +--
.../validations/property_validations.rb | 2 +-
.../sales/financial_validations.rb | 4 +-
.../sales/household_validations.rb | 12 ++--
.../validations/sales/property_validations.rb | 2 +-
.../sales/sale_information_validations.rb | 18 ++---
.../validations/sales/soft_validations.rb | 4 +-
app/models/validations/shared_validations.rb | 2 +-
.../exports/lettings_log_export_service.rb | 4 +-
...ime_property_let_as_social_housing_spec.rb | 2 +-
...ead_tenant_ethnic_background_white_spec.rb | 2 +-
.../form/lettings/pages/person_age_spec.rb | 2 +-
.../pages/person_relationship_to_lead_spec.rb | 2 +-
.../pages/previous_local_authority_spec.rb | 2 +-
.../lettings/pages/previous_postcode_spec.rb | 2 +-
.../pages/property_local_authority_spec.rb | 4 +-
.../property_wheelchair_accessible_spec.rb | 2 +-
.../form/lettings/pages/renewal_spec.rb | 2 +-
.../form/lettings/pages/rent_type_spec.rb | 2 +-
.../pages/starter_tenancy_type_spec.rb | 2 +-
spec/models/form/lettings/pages/uprn_spec.rb | 4 +-
.../lettings/questions/age1_known_spec.rb | 2 +-
.../form/lettings/questions/age_spec.rb | 2 +-
.../lettings/questions/declaration_spec.rb | 6 +-
.../lettings/questions/ethnic_white_spec.rb | 4 +-
...ime_property_let_as_social_housing_spec.rb | 4 +-
.../questions/gender_identity1_spec.rb | 2 +-
.../models/form/lettings/questions/hb_spec.rb | 2 +-
.../questions/housingneeds_other_spec.rb | 4 +-
.../lettings/questions/is_carehome_spec.rb | 4 +-
.../form/lettings/questions/joint_spec.rb | 2 +-
.../form/lettings/questions/layear_spec.rb | 4 +-
.../questions/letting_allocation_spec.rb | 4 +-
.../questions/person_relationship_spec.rb | 2 +-
.../form/lettings/questions/ppcodenk_spec.rb | 2 +-
.../questions/previous_la_known_spec.rb | 2 +-
.../questions/previous_let_type_spec.rb | 4 +-
.../lettings/questions/reason_renewal_spec.rb | 4 +-
.../form/lettings/questions/reason_spec.rb | 4 +-
.../lettings/questions/reasonpref_spec.rb | 2 +-
.../lettings/questions/referral_prp_spec.rb | 4 +-
.../form/lettings/questions/referral_spec.rb | 4 +-
.../referral_supported_housing_prp_spec.rb | 4 +-
.../referral_supported_housing_spec.rb | 4 +-
.../form/lettings/questions/renewal_spec.rb | 2 +-
.../form/lettings/questions/rent_type_spec.rb | 6 +-
.../form/lettings/questions/rsnvac_spec.rb | 4 +-
.../form/lettings/questions/scheme_id_spec.rb | 2 +-
.../form/lettings/questions/sheltered_spec.rb | 4 +-
.../questions/starter_tenancy_type_spec.rb | 4 +-
.../tenancy_length_affordable_rent_spec.rb | 2 +-
.../tenancy_length_intermediate_rent_spec.rb | 2 +-
.../lettings/questions/tenancy_type_spec.rb | 6 +-
.../form/lettings/questions/waityear_spec.rb | 4 +-
.../lettings/questions/wheelchair_spec.rb | 2 +-
.../household_characteristics_spec.rb | 4 +-
.../subsections/household_situation_spec.rb | 4 +-
.../subsections/property_information_spec.rb | 4 +-
.../form/lettings/subsections/setup_spec.rb | 4 +-
.../subsections/tenancy_information_spec.rb | 4 +-
.../buyer1_ethnic_background_arab_spec.rb | 2 +-
.../buyer1_ethnic_background_asian_spec.rb | 2 +-
.../buyer1_ethnic_background_black_spec.rb | 2 +-
.../buyer1_ethnic_background_mixed_spec.rb | 2 +-
.../buyer1_ethnic_background_white_spec.rb | 2 +-
.../sales/pages/buyer1_ethnic_group_spec.rb | 2 +-
.../pages/buyer1_live_in_property_spec.rb | 2 +-
.../sales/pages/buyer1_nationality_spec.rb | 4 +-
.../pages/buyer1_working_situation_spec.rb | 2 +-
.../sales/pages/buyer2_nationality_spec.rb | 4 +-
.../buyer2_relationship_to_buyer1_spec.rb | 2 +-
.../form/sales/pages/buyer_interview_spec.rb | 4 +-
.../form/sales/pages/buyer_live_spec.rb | 2 +-
.../form/sales/pages/buyer_previous_spec.rb | 2 +-
.../form/sales/pages/deposit_discount_spec.rb | 4 +-
spec/models/form/sales/pages/deposit_spec.rb | 6 +-
spec/models/form/sales/pages/discount_spec.rb | 2 +-
.../form/sales/pages/la_nominations_spec.rb | 2 +-
.../sales/pages/last_accommodation_la_spec.rb | 2 +-
.../sales/pages/last_accommodation_spec.rb | 2 +-
.../sales/pages/managing_organisation_spec.rb | 4 +-
.../person_relationship_to_buyer1_spec.rb | 2 +-
.../form/sales/pages/privacy_notice_spec.rb | 6 +-
.../pages/property_local_authority_spec.rb | 4 +-
.../property_wheelchair_accessible_spec.rb | 2 +-
.../form/sales/pages/purchase_price_spec.rb | 2 +-
.../sales/pages/shared_ownership_type_spec.rb | 2 +-
spec/models/form/sales/pages/uprn_spec.rb | 4 +-
.../buyer1_ethnic_background_arab_spec.rb | 2 +-
.../buyer1_ethnic_background_asian_spec.rb | 2 +-
.../buyer1_ethnic_background_black_spec.rb | 2 +-
.../buyer1_ethnic_background_mixed_spec.rb | 2 +-
.../buyer1_ethnic_background_white_spec.rb | 4 +-
.../questions/buyer1_ethnic_group_spec.rb | 2 +-
.../questions/buyer1_live_in_property_spec.rb | 2 +-
.../buyer1_working_situation_spec.rb | 2 +-
.../buyer2_ethnic_background_white_spec.rb | 4 +-
.../buyer2_relationship_to_buyer1_spec.rb | 2 +-
.../sales/questions/buyer_interview_spec.rb | 10 +--
.../form/sales/questions/buyer_live_spec.rb | 2 +-
.../sales/questions/buyer_previous_spec.rb | 4 +-
.../form/sales/questions/discount_spec.rb | 4 +-
.../sales/questions/mortgage_lender_spec.rb | 6 +-
.../form/sales/questions/mortgageused_spec.rb | 4 +-
.../questions/nationality_all_group_spec.rb | 2 +-
.../questions/number_joint_buyers_spec.rb | 2 +-
.../sales/questions/ownership_scheme_spec.rb | 4 +-
.../form/sales/questions/person_age_spec.rb | 2 +-
.../person_relationship_to_buyer1_spec.rb | 2 +-
.../sales/questions/privacy_notice_spec.rb | 6 +-
.../property_wheelchair_accessible_spec.rb | 2 +-
.../questions/shared_ownership_type_spec.rb | 6 +-
.../household_characteristics_spec.rb | 6 +-
.../sales/subsections/outright_sale_spec.rb | 6 +-
.../subsections/property_information_spec.rb | 4 +-
.../form/sales/subsections/setup_spec.rb | 4 +-
.../shared_ownership_scheme_spec.rb | 2 +-
.../validations/property_validations_spec.rb | 4 +-
181 files changed, 342 insertions(+), 338 deletions(-)
diff --git a/app/models/derived_variables/lettings_log_variables.rb b/app/models/derived_variables/lettings_log_variables.rb
index e50161188..9219392f7 100644
--- a/app/models/derived_variables/lettings_log_variables.rb
+++ b/app/models/derived_variables/lettings_log_variables.rb
@@ -65,7 +65,7 @@ module DerivedVariables::LettingsLogVariables
self.has_benefits = get_has_benefits
self.tshortfall_known = 0 if tshortfall
self.nocharge = household_charge&.zero? ? 1 : 0
- if form.start_year_after_2024? && is_bedsit?
+ if form.start_year_2024_or_later? && is_bedsit?
self.beds = 1
end
@@ -186,7 +186,7 @@ private
self.wchair = nil
self.location_id = nil
end
- if form.start_year_after_2024? && (unittype_gn_changed? && unittype_gn_was == 2)
+ if form.start_year_2024_or_later? && (unittype_gn_changed? && unittype_gn_was == 2)
self.beds = nil
end
end
diff --git a/app/models/derived_variables/sales_log_variables.rb b/app/models/derived_variables/sales_log_variables.rb
index f23f9eb28..e182c2158 100644
--- a/app/models/derived_variables/sales_log_variables.rb
+++ b/app/models/derived_variables/sales_log_variables.rb
@@ -29,7 +29,7 @@ module DerivedVariables::SalesLogVariables
end
end
- if saledate && form.start_year_after_2024? && discounted_ownership_sale?
+ if saledate && form.start_year_2024_or_later? && discounted_ownership_sale?
self.ppostcode_full = postcode_full
self.ppcodenk = pcodenk
self.prevloc = la
@@ -44,7 +44,7 @@ module DerivedVariables::SalesLogVariables
self.hhmemb = number_of_household_members
self.hhtype = household_type
- if saledate && form.start_year_after_2024?
+ if saledate && form.start_year_2024_or_later?
self.soctenant = soctenant_from_prevten_values
child_under_16_constraints!
end
diff --git a/app/models/form.rb b/app/models/form.rb
index 4336376e6..ce77378ca 100644
--- a/app/models/form.rb
+++ b/app/models/form.rb
@@ -334,7 +334,11 @@ class Form
type == "sales" || (start_year && start_year.to_i > 2022)
end
- def start_year_after_2024?
+ def start_year_2024_or_later?
start_date && start_date.year >= 2024
end
+
+ def start_year_2025_or_later?
+ start_date && start_date.year >= 2025
+ end
end
diff --git a/app/models/form/lettings/pages/lead_tenant_nationality.rb b/app/models/form/lettings/pages/lead_tenant_nationality.rb
index d4845f8f9..410a6320f 100644
--- a/app/models/form/lettings/pages/lead_tenant_nationality.rb
+++ b/app/models/form/lettings/pages/lead_tenant_nationality.rb
@@ -2,12 +2,12 @@ class Form::Lettings::Pages::LeadTenantNationality < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "lead_tenant_nationality"
- @copy_key = "lettings.household_characteristics.#{form.start_year_after_2024? ? 'nationality_all' : 'national'}"
+ @copy_key = "lettings.household_characteristics.#{form.start_year_2024_or_later? ? 'nationality_all' : 'national'}"
@depends_on = [{ "declaration" => 1 }]
end
def questions
- @questions ||= if form.start_year_after_2024?
+ @questions ||= if form.start_year_2024_or_later?
[
Form::Lettings::Questions::NationalityAllGroup.new(nil, nil, self),
Form::Lettings::Questions::NationalityAll.new(nil, nil, self),
diff --git a/app/models/form/lettings/pages/property_local_authority.rb b/app/models/form/lettings/pages/property_local_authority.rb
index 1e3d34bd2..339ccb4d8 100644
--- a/app/models/form/lettings/pages/property_local_authority.rb
+++ b/app/models/form/lettings/pages/property_local_authority.rb
@@ -3,8 +3,8 @@ class Form::Lettings::Pages::PropertyLocalAuthority < ::Form::Page
super
@id = "property_local_authority"
@depends_on = [
- { "is_la_inferred" => false, "is_general_needs?" => true, "form.start_year_after_2024?" => false },
- { "is_la_inferred" => false, "is_general_needs?" => true, "form.start_year_after_2024?" => true, "address_search_given?" => true },
+ { "is_la_inferred" => false, "is_general_needs?" => true, "form.start_year_2024_or_later?" => false },
+ { "is_la_inferred" => false, "is_general_needs?" => true, "form.start_year_2024_or_later?" => true, "address_search_given?" => true },
]
end
diff --git a/app/models/form/lettings/pages/uprn.rb b/app/models/form/lettings/pages/uprn.rb
index 474928eb3..b9a3a4e94 100644
--- a/app/models/form/lettings/pages/uprn.rb
+++ b/app/models/form/lettings/pages/uprn.rb
@@ -14,7 +14,7 @@ class Form::Lettings::Pages::Uprn < ::Form::Page
end
def skip_text
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
"Search for address instead"
else
"Enter address instead"
@@ -24,7 +24,7 @@ class Form::Lettings::Pages::Uprn < ::Form::Page
def skip_href(log = nil)
return unless log
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
"address-matcher"
else
"address"
diff --git a/app/models/form/lettings/questions/age.rb b/app/models/form/lettings/questions/age.rb
index b861cb39f..f35abe61e 100644
--- a/app/models/form/lettings/questions/age.rb
+++ b/app/models/form/lettings/questions/age.rb
@@ -27,7 +27,7 @@ class Form::Lettings::Questions::Age < ::Form::Question
end
def hint_text
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
"Answer 1 for children aged under 1 year old"
end
end
diff --git a/app/models/form/lettings/questions/declaration.rb b/app/models/form/lettings/questions/declaration.rb
index 0e2fd5b2c..3261452cd 100644
--- a/app/models/form/lettings/questions/declaration.rb
+++ b/app/models/form/lettings/questions/declaration.rb
@@ -3,13 +3,13 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
super
@id = "declaration"
@type = "checkbox"
- @check_answers_card_number = 0 unless form.start_year_after_2024?
+ @check_answers_card_number = 0 unless form.start_year_2024_or_later?
@top_guidance_partial = "privacy_notice_tenant"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
- declaration_text = if form.start_year_after_2024?
+ declaration_text = if form.start_year_2024_or_later?
"The tenant has seen or been given access to the MHCLG privacy notice"
else
"The tenant has seen the MHCLG privacy notice"
@@ -19,7 +19,7 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
end
def unanswered_error_message
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
I18n.t("validations.declaration.missing.post_2024")
else
I18n.t("validations.declaration.missing.pre_2024")
diff --git a/app/models/form/lettings/questions/ethnic_white.rb b/app/models/form/lettings/questions/ethnic_white.rb
index 40b99bc9f..74430d840 100644
--- a/app/models/form/lettings/questions/ethnic_white.rb
+++ b/app/models/form/lettings/questions/ethnic_white.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" },
diff --git a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
index 9d54cfcb3..bc1c66cb4 100644
--- a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
+++ b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
@@ -15,11 +15,11 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
end
def yes_hint
- form.start_year_after_2024? ? "This property was previously used for other purposes or is a new-build." : "This is a new let."
+ form.start_year_2024_or_later? ? "This property was previously used for other purposes or is a new-build." : "This is a new let."
end
def no_hint
- form.start_year_after_2024? ? "This is a re-let of existing social housing stock." : "This is a re-let of existing social housing."
+ form.start_year_2024_or_later? ? "This is a re-let of existing social housing stock." : "This is a re-let of existing social housing."
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15 }.freeze
diff --git a/app/models/form/lettings/questions/housingneeds_other.rb b/app/models/form/lettings/questions/housingneeds_other.rb
index 75834d3bb..fc403d00c 100644
--- a/app/models/form/lettings/questions/housingneeds_other.rb
+++ b/app/models/form/lettings/questions/housingneeds_other.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No" },
diff --git a/app/models/form/lettings/questions/is_carehome.rb b/app/models/form/lettings/questions/is_carehome.rb
index efb29a817..25dae3fc6 100644
--- a/app/models/form/lettings/questions/is_carehome.rb
+++ b/app/models/form/lettings/questions/is_carehome.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No" },
diff --git a/app/models/form/lettings/questions/layear.rb b/app/models/form/lettings/questions/layear.rb
index 63f99c36f..fdaad6c22 100644
--- a/app/models/form/lettings/questions/layear.rb
+++ b/app/models/form/lettings/questions/layear.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "Just moved to local authority area with this new let" },
"2" => { "value" => "Less than 1 year" },
diff --git a/app/models/form/lettings/questions/letting_allocation.rb b/app/models/form/lettings/questions/letting_allocation.rb
index 0ae7b740d..08310da13 100644
--- a/app/models/form/lettings/questions/letting_allocation.rb
+++ b/app/models/form/lettings/questions/letting_allocation.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"cbl" => { "value" => "Choice-based lettings (CBL)", "hint" => "Where available vacant properties are advertised and applicants are able to bid for specific properties." },
"cap" => { "value" => "Common Allocation Policy (CAP)", "hint" => "Where a common system agreed between a group of housing providers is used to determine applicant’s priority for housing." },
diff --git a/app/models/form/lettings/questions/person_relationship.rb b/app/models/form/lettings/questions/person_relationship.rb
index ec7a78969..d39cb49ff 100644
--- a/app/models/form/lettings/questions/person_relationship.rb
+++ b/app/models/form/lettings/questions/person_relationship.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"P" => { "value" => "Partner" },
"C" => { "value" => "Child" },
diff --git a/app/models/form/lettings/questions/previous_let_type.rb b/app/models/form/lettings/questions/previous_let_type.rb
index 577571571..8c50cb41a 100644
--- a/app/models/form/lettings/questions/previous_let_type.rb
+++ b/app/models/form/lettings/questions/previous_let_type.rb
@@ -4,7 +4,7 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
@id = "unitletas"
@type = "radio"
@check_answers_card_number = 0
- @answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_AFTER_2024 : ANSWER_OPTIONS
+ @answer_options = form.start_year_2024_or_later? ? ANSWER_OPTIONS_AFTER_2024 : ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
diff --git a/app/models/form/lettings/questions/reason.rb b/app/models/form/lettings/questions/reason.rb
index 4bc00ce43..3a659fc5c 100644
--- a/app/models/form/lettings/questions/reason.rb
+++ b/app/models/form/lettings/questions/reason.rb
@@ -14,7 +14,7 @@ class Form::Lettings::Questions::Reason < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
diff --git a/app/models/form/lettings/questions/reason_renewal.rb b/app/models/form/lettings/questions/reason_renewal.rb
index 9a9ee72de..c00bd2581 100644
--- a/app/models/form/lettings/questions/reason_renewal.rb
+++ b/app/models/form/lettings/questions/reason_renewal.rb
@@ -14,7 +14,7 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
diff --git a/app/models/form/lettings/questions/referral.rb b/app/models/form/lettings/questions/referral.rb
index 904668a4b..98e5a9186 100644
--- a/app/models/form/lettings/questions/referral.rb
+++ b/app/models/form/lettings/questions/referral.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::Referral < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => {
"value" => "Internal transfer",
diff --git a/app/models/form/lettings/questions/referral_prp.rb b/app/models/form/lettings/questions/referral_prp.rb
index 76ad3fbf8..96da2cba3 100644
--- a/app/models/form/lettings/questions/referral_prp.rb
+++ b/app/models/form/lettings/questions/referral_prp.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => {
"value" => "Internal transfer",
diff --git a/app/models/form/lettings/questions/referral_supported_housing.rb b/app/models/form/lettings/questions/referral_supported_housing.rb
index 50822705e..d8d05fade 100644
--- a/app/models/form/lettings/questions/referral_supported_housing.rb
+++ b/app/models/form/lettings/questions/referral_supported_housing.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => {
"value" => "Internal transfer",
diff --git a/app/models/form/lettings/questions/referral_supported_housing_prp.rb b/app/models/form/lettings/questions/referral_supported_housing_prp.rb
index cab8fbbc9..75cc218fe 100644
--- a/app/models/form/lettings/questions/referral_supported_housing_prp.rb
+++ b/app/models/form/lettings/questions/referral_supported_housing_prp.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => {
"value" => "Internal transfer",
diff --git a/app/models/form/lettings/questions/rent_type.rb b/app/models/form/lettings/questions/rent_type.rb
index bc6934200..b941dfcc3 100644
--- a/app/models/form/lettings/questions/rent_type.rb
+++ b/app/models/form/lettings/questions/rent_type.rb
@@ -5,7 +5,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@copy_key = "lettings.setup.rent_type.rent_type"
@type = "radio"
@top_guidance_partial = "rent_type_definitions"
- @answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_2024 : ANSWER_OPTIONS
+ @answer_options = form.start_year_2024_or_later? ? ANSWER_OPTIONS_2024 : ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
diff --git a/app/models/form/lettings/questions/rsnvac.rb b/app/models/form/lettings/questions/rsnvac.rb
index 935980712..3f767d311 100644
--- a/app/models/form/lettings/questions/rsnvac.rb
+++ b/app/models/form/lettings/questions/rsnvac.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"14" => {
"value" => "Renewal of fixed-term tenancy",
diff --git a/app/models/form/lettings/questions/sheltered.rb b/app/models/form/lettings/questions/sheltered.rb
index 7b80bb5bf..458772675 100644
--- a/app/models/form/lettings/questions/sheltered.rb
+++ b/app/models/form/lettings/questions/sheltered.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Sheltered < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{ "1" => { "value" => "Yes – specialist retirement housing" },
"2" => { "value" => "Yes – extra care housing" },
"5" => { "value" => "Yes – sheltered housing for adults aged under 55 years" },
diff --git a/app/models/form/lettings/questions/starter_tenancy_type.rb b/app/models/form/lettings/questions/starter_tenancy_type.rb
index 85d4a14ff..03d3fee88 100644
--- a/app/models/form/lettings/questions/starter_tenancy_type.rb
+++ b/app/models/form/lettings/questions/starter_tenancy_type.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term",
diff --git a/app/models/form/lettings/questions/tenancy_type.rb b/app/models/form/lettings/questions/tenancy_type.rb
index 9a83b44cb..c67895bef 100644
--- a/app/models/form/lettings/questions/tenancy_type.rb
+++ b/app/models/form/lettings/questions/tenancy_type.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term",
diff --git a/app/models/form/lettings/questions/uprn_confirmation.rb b/app/models/form/lettings/questions/uprn_confirmation.rb
index 1c31485b6..2f03cb357 100644
--- a/app/models/form/lettings/questions/uprn_confirmation.rb
+++ b/app/models/form/lettings/questions/uprn_confirmation.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::UprnConfirmation < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No, I want to search for the address instead" },
diff --git a/app/models/form/lettings/questions/waityear.rb b/app/models/form/lettings/questions/waityear.rb
index 045765951..67a560167 100644
--- a/app/models/form/lettings/questions/waityear.rb
+++ b/app/models/form/lettings/questions/waityear.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" },
diff --git a/app/models/form/lettings/subsections/household_characteristics.rb b/app/models/form/lettings/subsections/household_characteristics.rb
index e95cdf19c..61334d84c 100644
--- a/app/models/form/lettings/subsections/household_characteristics.rb
+++ b/app/models/form/lettings/subsections/household_characteristics.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
def pages
@pages ||= [
- (Form::Lettings::Pages::Declaration.new(nil, nil, self) unless form.start_year_after_2024?),
+ (Form::Lettings::Pages::Declaration.new(nil, nil, self) unless form.start_year_2024_or_later?),
Form::Lettings::Pages::HouseholdMembers.new(nil, nil, self),
Form::Lettings::Pages::NoFemalesPregnantHouseholdLeadHhmembValueCheck.new(nil, nil, self),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdLeadHhmembValueCheck.new(nil, nil, self),
@@ -33,8 +33,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::LeadTenantOverRetirementValueCheck.new("working_situation_lead_tenant_over_retirement_value_check", nil, self),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 2),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 2),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_2_multiple_partners_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_2_multiple_partners_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 2),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 2),
@@ -42,7 +42,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 2),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_2_under_retirement_value_check", nil, self, person_index: 2),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_2_over_retirement_value_check", nil, self, person_index: 2),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 2),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 2),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
@@ -53,8 +53,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_2_over_retirement_value_check", nil, self, person_index: 2),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 3),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 3),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_3_multiple_partners_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_3_multiple_partners_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 3),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 3),
@@ -62,7 +62,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 3),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_3_under_retirement_value_check", nil, self, person_index: 3),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_3_over_retirement_value_check", nil, self, person_index: 3),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 3),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 3),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
@@ -73,8 +73,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_3_over_retirement_value_check", nil, self, person_index: 3),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 4),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 4),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_4_multiple_partners_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_4_multiple_partners_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 4),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 4),
@@ -82,7 +82,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 4),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_4_under_retirement_value_check", nil, self, person_index: 4),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_4_over_retirement_value_check", nil, self, person_index: 4),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 4),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 4),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
@@ -93,8 +93,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_4_over_retirement_value_check", nil, self, person_index: 4),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 5),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 5),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_5_multiple_partners_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_5_multiple_partners_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 5),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 5),
@@ -102,7 +102,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 5),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_5_under_retirement_value_check", nil, self, person_index: 5),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_5_over_retirement_value_check", nil, self, person_index: 5),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 5),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 5),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
@@ -113,8 +113,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_5_over_retirement_value_check", nil, self, person_index: 5),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 6),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 6),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_6_multiple_partners_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_6_multiple_partners_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 6),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 6),
@@ -122,7 +122,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 6),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_6_under_retirement_value_check", nil, self, person_index: 6),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_6_over_retirement_value_check", nil, self, person_index: 6),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 6),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 6),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
@@ -133,8 +133,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_6_over_retirement_value_check", nil, self, person_index: 6),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 7),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 7),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_7_partner_under_16_value_check", nil, self, person_index: 7) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_7_multiple_partners_value_check", nil, self, person_index: 7) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_7_partner_under_16_value_check", nil, self, person_index: 7) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_7_multiple_partners_value_check", nil, self, person_index: 7) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 7),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 7),
@@ -142,7 +142,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 7),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_7_under_retirement_value_check", nil, self, person_index: 7),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_7_over_retirement_value_check", nil, self, person_index: 7),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_7_partner_under_16_value_check", nil, self, person_index: 7) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_7_partner_under_16_value_check", nil, self, person_index: 7) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 7),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 7),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
@@ -153,8 +153,8 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("working_situation_7_over_retirement_value_check", nil, self, person_index: 7),
Form::Lettings::Pages::PersonKnown.new(nil, nil, self, person_index: 8),
Form::Lettings::Pages::PersonRelationshipToLead.new(nil, nil, self, person_index: 8),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_8_partner_under_16_value_check", nil, self, person_index: 8) if form.start_year_after_2024?),
- (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_8_multiple_partners_value_check", nil, self, person_index: 8) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("relationship_8_partner_under_16_value_check", nil, self, person_index: 8) if form.start_year_2024_or_later?),
+ (Form::Lettings::Pages::MultiplePartnersValueCheck.new("relationship_8_multiple_partners_value_check", nil, self, person_index: 8) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonAge.new(nil, nil, self, person_index: 8),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCheck.new(nil, nil, self,
person_index: 8),
@@ -162,7 +162,7 @@ class Form::Lettings::Subsections::HouseholdCharacteristics < ::Form::Subsection
person_index: 8),
Form::Lettings::Pages::PersonUnderRetirementValueCheck.new("age_8_under_retirement_value_check", nil, self, person_index: 8),
Form::Lettings::Pages::PersonOverRetirementValueCheck.new("age_8_over_retirement_value_check", nil, self, person_index: 8),
- (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_8_partner_under_16_value_check", nil, self, person_index: 8) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::PartnerUnder16ValueCheck.new("age_8_partner_under_16_value_check", nil, self, person_index: 8) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PersonGenderIdentity.new(nil, nil, self, person_index: 8),
Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck.new(nil, nil, self, person_index: 8),
Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPersonValueCheck.new(nil, nil, self,
diff --git a/app/models/form/lettings/subsections/household_situation.rb b/app/models/form/lettings/subsections/household_situation.rb
index 6646d7230..dc3fd608b 100644
--- a/app/models/form/lettings/subsections/household_situation.rb
+++ b/app/models/form/lettings/subsections/household_situation.rb
@@ -12,7 +12,7 @@ class Form::Lettings::Subsections::HouseholdSituation < ::Form::Subsection
Form::Lettings::Pages::TimeOnWaitingList.new(nil, nil, self),
Form::Lettings::Pages::ReasonForLeavingLastSettledHome.new(nil, nil, self),
Form::Lettings::Pages::ReasonForLeavingLastSettledHomeRenewal.new(nil, nil, self),
- (Form::Lettings::Pages::ReasonotherValueCheck.new(nil, nil, self) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::ReasonotherValueCheck.new(nil, nil, self) if form.start_year_2024_or_later?),
Form::Lettings::Pages::PreviousHousingSituation.new(nil, nil, self),
Form::Lettings::Pages::PreviousHousingSituationRenewal.new(nil, nil, self),
Form::Lettings::Pages::Homelessness.new("homelessness", nil, self),
diff --git a/app/models/form/lettings/subsections/property_information.rb b/app/models/form/lettings/subsections/property_information.rb
index fa2ff0efa..c80e49e84 100644
--- a/app/models/form/lettings/subsections/property_information.rb
+++ b/app/models/form/lettings/subsections/property_information.rb
@@ -29,7 +29,7 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection
end
def uprn_questions
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
[
Form::Lettings::Pages::Uprn.new(nil, nil, self),
Form::Lettings::Pages::UprnConfirmation.new(nil, nil, self),
@@ -48,7 +48,7 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection
end
def number_of_times_relet
- Form::Lettings::Pages::PropertyNumberOfTimesRelet.new(nil, nil, self) unless form.start_year_after_2024?
+ Form::Lettings::Pages::PropertyNumberOfTimesRelet.new(nil, nil, self) unless form.start_year_2024_or_later?
end
def displayed_in_tasklist?(log)
diff --git a/app/models/form/lettings/subsections/setup.rb b/app/models/form/lettings/subsections/setup.rb
index 1970149ed..0e65c2f13 100644
--- a/app/models/form/lettings/subsections/setup.rb
+++ b/app/models/form/lettings/subsections/setup.rb
@@ -20,7 +20,7 @@ class Form::Lettings::Subsections::Setup < ::Form::Subsection
Form::Lettings::Pages::RentType.new(nil, nil, self),
Form::Lettings::Pages::TenantCode.new(nil, nil, self),
Form::Lettings::Pages::PropertyReference.new(nil, nil, self),
- (Form::Lettings::Pages::Declaration.new(nil, nil, self) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::Declaration.new(nil, nil, self) if form.start_year_2024_or_later?),
].compact
end
diff --git a/app/models/form/lettings/subsections/tenancy_information.rb b/app/models/form/lettings/subsections/tenancy_information.rb
index 5525c182f..f0b7f4bef 100644
--- a/app/models/form/lettings/subsections/tenancy_information.rb
+++ b/app/models/form/lettings/subsections/tenancy_information.rb
@@ -15,7 +15,7 @@ class Form::Lettings::Subsections::TenancyInformation < ::Form::Subsection
Form::Lettings::Pages::TenancyLength.new(nil, nil, self),
Form::Lettings::Pages::TenancyLengthAffordableRent.new(nil, nil, self),
Form::Lettings::Pages::TenancyLengthIntermediateRent.new(nil, nil, self),
- (Form::Lettings::Pages::TenancyLengthPeriodic.new(nil, nil, self) if form.start_year_after_2024?),
+ (Form::Lettings::Pages::TenancyLengthPeriodic.new(nil, nil, self) if form.start_year_2024_or_later?),
Form::Lettings::Pages::ShelteredAccommodation.new(nil, nil, self),
].flatten.compact
end
diff --git a/app/models/form/sales/pages/buyer1_nationality.rb b/app/models/form/sales/pages/buyer1_nationality.rb
index 6bcf12952..791ecafac 100644
--- a/app/models/form/sales/pages/buyer1_nationality.rb
+++ b/app/models/form/sales/pages/buyer1_nationality.rb
@@ -13,7 +13,7 @@ class Form::Sales::Pages::Buyer1Nationality < ::Form::Page
end
def questions
- @questions ||= if form.start_year_after_2024?
+ @questions ||= if form.start_year_2024_or_later?
[
Form::Sales::Questions::NationalityAllGroup.new("nationality_all_group", nil, self, 1),
Form::Sales::Questions::NationalityAll.new("nationality_all", nil, self, 1),
diff --git a/app/models/form/sales/pages/buyer2_nationality.rb b/app/models/form/sales/pages/buyer2_nationality.rb
index bbec2a105..30790fd63 100644
--- a/app/models/form/sales/pages/buyer2_nationality.rb
+++ b/app/models/form/sales/pages/buyer2_nationality.rb
@@ -15,7 +15,7 @@ class Form::Sales::Pages::Buyer2Nationality < ::Form::Page
end
def questions
- @questions ||= if form.start_year_after_2024?
+ @questions ||= if form.start_year_2024_or_later?
[
Form::Sales::Questions::NationalityAllGroup.new("nationality_all_buyer2_group", nil, self, 2),
Form::Sales::Questions::NationalityAll.new("nationality_all_buyer2", nil, self, 2),
diff --git a/app/models/form/sales/pages/buyer_previous.rb b/app/models/form/sales/pages/buyer_previous.rb
index 0d20207a3..197a68971 100644
--- a/app/models/form/sales/pages/buyer_previous.rb
+++ b/app/models/form/sales/pages/buyer_previous.rb
@@ -13,7 +13,7 @@ class Form::Sales::Pages::BuyerPrevious < ::Form::Page
end
def routed_to?(log, _current_user)
- return false if log.is_staircase? && form.start_year_after_2024?
+ return false if log.is_staircase? && form.start_year_2024_or_later?
super
end
diff --git a/app/models/form/sales/pages/deposit.rb b/app/models/form/sales/pages/deposit.rb
index f0bbda05c..4870a3c35 100644
--- a/app/models/form/sales/pages/deposit.rb
+++ b/app/models/form/sales/pages/deposit.rb
@@ -15,7 +15,7 @@ class Form::Sales::Pages::Deposit < ::Form::Page
def routed_to?(log, _user)
return false unless super
return true if log.ownershipsch == 2 || (log.ownershipsch == 3 && log.mortgageused == 1)
- return false if log.stairowned_100? != @optional && form.start_year_after_2024?
+ return false if log.stairowned_100? != @optional && form.start_year_2024_or_later?
log.ownershipsch == 1
end
diff --git a/app/models/form/sales/pages/deposit_discount.rb b/app/models/form/sales/pages/deposit_discount.rb
index caf726460..84fcbb45f 100644
--- a/app/models/form/sales/pages/deposit_discount.rb
+++ b/app/models/form/sales/pages/deposit_discount.rb
@@ -12,7 +12,7 @@ class Form::Sales::Pages::DepositDiscount < ::Form::Page
end
def depends_on
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
[{ "social_homebuy?" => true, "stairowned_100?" => @optional }]
else
[{ "social_homebuy?" => true }]
diff --git a/app/models/form/sales/pages/la_nominations.rb b/app/models/form/sales/pages/la_nominations.rb
index 6adda533d..e86e0374a 100644
--- a/app/models/form/sales/pages/la_nominations.rb
+++ b/app/models/form/sales/pages/la_nominations.rb
@@ -12,7 +12,7 @@ class Form::Sales::Pages::LaNominations < ::Form::Page
end
def routed_to?(log, _current_user)
- return false if log.staircase == 1 && form.start_year_after_2024?
+ return false if log.staircase == 1 && form.start_year_2024_or_later?
super
end
diff --git a/app/models/form/sales/pages/last_accommodation.rb b/app/models/form/sales/pages/last_accommodation.rb
index f9d167028..42620038b 100644
--- a/app/models/form/sales/pages/last_accommodation.rb
+++ b/app/models/form/sales/pages/last_accommodation.rb
@@ -13,7 +13,7 @@ class Form::Sales::Pages::LastAccommodation < ::Form::Page
end
def routed_to?(log, _user)
- return false if form.start_year_after_2024? && log.discounted_ownership_sale?
+ return false if form.start_year_2024_or_later? && log.discounted_ownership_sale?
super
end
diff --git a/app/models/form/sales/pages/last_accommodation_la.rb b/app/models/form/sales/pages/last_accommodation_la.rb
index 9cae326bf..ceb5b272c 100644
--- a/app/models/form/sales/pages/last_accommodation_la.rb
+++ b/app/models/form/sales/pages/last_accommodation_la.rb
@@ -16,7 +16,7 @@ class Form::Sales::Pages::LastAccommodationLa < ::Form::Page
end
def routed_to?(log, _user)
- return false if form.start_year_after_2024? && log.discounted_ownership_sale?
+ return false if form.start_year_2024_or_later? && log.discounted_ownership_sale?
super
end
diff --git a/app/models/form/sales/pages/managing_organisation.rb b/app/models/form/sales/pages/managing_organisation.rb
index 3d8e59383..bf51602a4 100644
--- a/app/models/form/sales/pages/managing_organisation.rb
+++ b/app/models/form/sales/pages/managing_organisation.rb
@@ -13,7 +13,7 @@ class Form::Sales::Pages::ManagingOrganisation < ::Form::Page
def routed_to?(log, current_user)
return false unless current_user
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
organisation = current_user.support? ? log.owning_organisation : current_user.organisation
return false unless organisation
diff --git a/app/models/form/sales/pages/property_local_authority.rb b/app/models/form/sales/pages/property_local_authority.rb
index 649a445f9..fe9ad1bc0 100644
--- a/app/models/form/sales/pages/property_local_authority.rb
+++ b/app/models/form/sales/pages/property_local_authority.rb
@@ -3,8 +3,8 @@ class Form::Sales::Pages::PropertyLocalAuthority < ::Form::Page
super
@id = "property_local_authority"
@depends_on = [
- { "is_la_inferred" => false, "form.start_year_after_2024?" => false },
- { "is_la_inferred" => false, "form.start_year_after_2024?" => true, "address_search_given?" => true },
+ { "is_la_inferred" => false, "form.start_year_2024_or_later?" => false },
+ { "is_la_inferred" => false, "form.start_year_2024_or_later?" => true, "address_search_given?" => true },
]
end
diff --git a/app/models/form/sales/pages/uprn.rb b/app/models/form/sales/pages/uprn.rb
index fce51e543..a78b87c2f 100644
--- a/app/models/form/sales/pages/uprn.rb
+++ b/app/models/form/sales/pages/uprn.rb
@@ -13,7 +13,7 @@ class Form::Sales::Pages::Uprn < ::Form::Page
end
def skip_text
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
"Search for address instead"
else
"Enter address instead"
@@ -23,7 +23,7 @@ class Form::Sales::Pages::Uprn < ::Form::Page
def skip_href(log = nil)
return unless log
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
"address-matcher"
else
"address"
diff --git a/app/models/form/sales/questions/buyer1_ethnic_background_white.rb b/app/models/form/sales/questions/buyer1_ethnic_background_white.rb
index 2bbe4939f..619c958f9 100644
--- a/app/models/form/sales/questions/buyer1_ethnic_background_white.rb
+++ b/app/models/form/sales/questions/buyer1_ethnic_background_white.rb
@@ -9,7 +9,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundWhite < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" },
diff --git a/app/models/form/sales/questions/buyer2_ethnic_background_white.rb b/app/models/form/sales/questions/buyer2_ethnic_background_white.rb
index 232e0f99e..be3e3ccff 100644
--- a/app/models/form/sales/questions/buyer2_ethnic_background_white.rb
+++ b/app/models/form/sales/questions/buyer2_ethnic_background_white.rb
@@ -9,7 +9,7 @@ class Form::Sales::Questions::Buyer2EthnicBackgroundWhite < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" },
diff --git a/app/models/form/sales/questions/buyer2_relationship_to_buyer1.rb b/app/models/form/sales/questions/buyer2_relationship_to_buyer1.rb
index 3f0fc299c..9520ace67 100644
--- a/app/models/form/sales/questions/buyer2_relationship_to_buyer1.rb
+++ b/app/models/form/sales/questions/buyer2_relationship_to_buyer1.rb
@@ -16,7 +16,7 @@ class Form::Sales::Questions::Buyer2RelationshipToBuyer1 < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"P" => { "value" => "Partner" },
diff --git a/app/models/form/sales/questions/buyer_previous.rb b/app/models/form/sales/questions/buyer_previous.rb
index dfc0c2fd2..4daf963bf 100644
--- a/app/models/form/sales/questions/buyer_previous.rb
+++ b/app/models/form/sales/questions/buyer_previous.rb
@@ -22,7 +22,7 @@ class Form::Sales::Questions::BuyerPrevious < ::Form::Question
end
def derived?(_log)
- form.start_year_after_2024?
+ form.start_year_2024_or_later?
end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 84 }.freeze
diff --git a/app/models/form/sales/questions/discount.rb b/app/models/form/sales/questions/discount.rb
index 1d8c5a46b..3807a8cfc 100644
--- a/app/models/form/sales/questions/discount.rb
+++ b/app/models/form/sales/questions/discount.rb
@@ -5,7 +5,7 @@ class Form::Sales::Questions::Discount < ::Form::Question
@type = "numeric"
@copy_key = "sales.sale_information.discount"
@min = 0
- @max = form.start_year_after_2024? ? 70 : 100
+ @max = form.start_year_2024_or_later? ? 70 : 100
@step = 0.1
@width = 5
@suffix = "%"
diff --git a/app/models/form/sales/questions/mortgage_lender.rb b/app/models/form/sales/questions/mortgage_lender.rb
index c5a10efb4..a4aa55f17 100644
--- a/app/models/form/sales/questions/mortgage_lender.rb
+++ b/app/models/form/sales/questions/mortgage_lender.rb
@@ -60,7 +60,7 @@ class Form::Sales::Questions::MortgageLender < ::Form::Question
OPTIONS_NOT_DISPLAYED = %w[0].freeze
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
ANSWER_OPTIONS
else
ANSWER_OPTIONS.dup.reject { |k, _v| OPTIONS_INTRODUCED_2024.include?(k) }
diff --git a/app/models/form/sales/questions/mortgageused.rb b/app/models/form/sales/questions/mortgageused.rb
index 341d3ff60..e4a101072 100644
--- a/app/models/form/sales/questions/mortgageused.rb
+++ b/app/models/form/sales/questions/mortgageused.rb
@@ -11,7 +11,7 @@ class Form::Sales::Questions::Mortgageused < ::Form::Question
end
def displayed_answer_options(log, _user = nil)
- if log.outright_sale? && log.saledate && !form.start_year_after_2024?
+ if log.outright_sale? && log.saledate && !form.start_year_2024_or_later?
answer_options_without_dont_know
elsif log.stairowned == 100 || log.outright_sale?
ANSWER_OPTIONS
diff --git a/app/models/form/sales/questions/ownership_scheme.rb b/app/models/form/sales/questions/ownership_scheme.rb
index 6b33a2566..f42f03f37 100644
--- a/app/models/form/sales/questions/ownership_scheme.rb
+++ b/app/models/form/sales/questions/ownership_scheme.rb
@@ -7,7 +7,7 @@ class Form::Sales::Questions::OwnershipScheme < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "Yes - a shared ownership scheme", "hint" => "When the purchaser buys an initial share of up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion, or a subsequent staircasing transaction" },
"2" => { "value" => "Yes - a discounted ownership scheme" },
diff --git a/app/models/form/sales/questions/person_relationship_to_buyer_1.rb b/app/models/form/sales/questions/person_relationship_to_buyer_1.rb
index af3f2a78b..9ac0791a4 100644
--- a/app/models/form/sales/questions/person_relationship_to_buyer_1.rb
+++ b/app/models/form/sales/questions/person_relationship_to_buyer_1.rb
@@ -16,7 +16,7 @@ class Form::Sales::Questions::PersonRelationshipToBuyer1 < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"P" => { "value" => "Partner" },
"C" => { "value" => "Child" },
diff --git a/app/models/form/sales/questions/privacy_notice.rb b/app/models/form/sales/questions/privacy_notice.rb
index 57f77041b..5e73e7a3a 100644
--- a/app/models/form/sales/questions/privacy_notice.rb
+++ b/app/models/form/sales/questions/privacy_notice.rb
@@ -10,7 +10,7 @@ class Form::Sales::Questions::PrivacyNotice < ::Form::Question
end
def answer_options
- declaration_text = if form.start_year_after_2024?
+ declaration_text = if form.start_year_2024_or_later?
"The #{@joint_purchase ? 'buyers have' : 'buyer has'} seen or been given access to the MHCLG privacy notice"
else
"The #{@joint_purchase ? 'buyers have' : 'buyer has'} seen the MHCLG privacy notice"
@@ -21,7 +21,7 @@ class Form::Sales::Questions::PrivacyNotice < ::Form::Question
def unanswered_error_message
buyer_or_buyers = @joint_purchase ? "buyers" : "buyer"
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
I18n.t("validations.privacynotice.missing.post_2024", buyer_or_buyers:)
else
I18n.t("validations.privacynotice.missing.pre_2024", buyer_or_buyers:)
diff --git a/app/models/form/sales/questions/uprn_confirmation.rb b/app/models/form/sales/questions/uprn_confirmation.rb
index 94c1afa36..fed35f665 100644
--- a/app/models/form/sales/questions/uprn_confirmation.rb
+++ b/app/models/form/sales/questions/uprn_confirmation.rb
@@ -6,7 +6,7 @@ class Form::Sales::Questions::UprnConfirmation < ::Form::Question
end
def answer_options
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No, I want to search for the address instead" },
diff --git a/app/models/form/sales/subsections/household_characteristics.rb b/app/models/form/sales/subsections/household_characteristics.rb
index afbbe4278..f1f01ba62 100644
--- a/app/models/form/sales/subsections/household_characteristics.rb
+++ b/app/models/form/sales/subsections/household_characteristics.rb
@@ -8,13 +8,13 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection
def pages
@pages ||= [
- (Form::Sales::Pages::BuyerInterview.new("buyer_interview_joint_purchase", nil, self, joint_purchase: true) unless form.start_year_after_2024?),
- (Form::Sales::Pages::BuyerInterview.new("buyer_interview", nil, self, joint_purchase: false) unless form.start_year_after_2024?),
- (Form::Sales::Pages::PrivacyNotice.new("privacy_notice_joint_purchase", nil, self, joint_purchase: true) unless form.start_year_after_2024?),
- (Form::Sales::Pages::PrivacyNotice.new("privacy_notice", nil, self, joint_purchase: false) unless form.start_year_after_2024?),
+ (Form::Sales::Pages::BuyerInterview.new("buyer_interview_joint_purchase", nil, self, joint_purchase: true) unless form.start_year_2024_or_later?),
+ (Form::Sales::Pages::BuyerInterview.new("buyer_interview", nil, self, joint_purchase: false) unless form.start_year_2024_or_later?),
+ (Form::Sales::Pages::PrivacyNotice.new("privacy_notice_joint_purchase", nil, self, joint_purchase: true) unless form.start_year_2024_or_later?),
+ (Form::Sales::Pages::PrivacyNotice.new("privacy_notice", nil, self, joint_purchase: false) unless form.start_year_2024_or_later?),
Form::Sales::Pages::Age1.new(nil, nil, self),
Form::Sales::Pages::RetirementValueCheck.new("age_1_retirement_value_check", nil, self, person_index: 1),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_1_not_retired_value_check", nil, self, person_index: 1) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_1_not_retired_value_check", nil, self, person_index: 1) if form.start_year_2024_or_later?),
Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("age_1_old_persons_shared_ownership_joint_purchase_value_check", nil, self, joint_purchase: true),
Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("age_1_old_persons_shared_ownership_value_check", nil, self, joint_purchase: false),
Form::Sales::Pages::GenderIdentity1.new(nil, nil, self),
@@ -27,7 +27,7 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Sales::Pages::Buyer1Nationality.new(nil, nil, self),
Form::Sales::Pages::Buyer1WorkingSituation.new(nil, nil, self),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_1_retirement_value_check", nil, self, person_index: 1),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_1_not_retired_value_check", nil, self, person_index: 1) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_1_not_retired_value_check", nil, self, person_index: 1) if form.start_year_2024_or_later?),
Form::Sales::Pages::Buyer1IncomeMinValueCheck.new("working_situation_buyer_1_income_min_value_check", nil, self),
Form::Sales::Pages::Buyer1LiveInProperty.new(nil, nil, self),
Form::Sales::Pages::BuyerLiveInValueCheck.new("buyer_1_live_in_property_value_check", nil, self, person_index: 1),
@@ -37,13 +37,13 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("age_2_old_persons_shared_ownership_joint_purchase_value_check", nil, self, joint_purchase: true),
Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck.new("age_2_old_persons_shared_ownership_value_check", nil, self, joint_purchase: false),
Form::Sales::Pages::RetirementValueCheck.new("age_2_buyer_retirement_value_check", nil, self, person_index: 2),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_2_buyer_not_retired_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_2_buyer_not_retired_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("buyer_2_age_student_not_child_value_check", nil, self, person_index: 2),
Form::Sales::Pages::GenderIdentity2.new(nil, nil, self),
buyer_2_ethnicity_nationality_pages,
Form::Sales::Pages::Buyer2WorkingSituation.new(nil, nil, self),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check_joint_purchase", nil, self, person_index: 2),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_2_not_retired_value_check_joint_purchase", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_2_not_retired_value_check_joint_purchase", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Sales::Pages::Buyer2IncomeMinValueCheck.new("working_situation_buyer_2_income_min_value_check", nil, self),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("buyer_2_working_situation_student_not_child_value_check", nil, self, person_index: 2),
Form::Sales::Pages::Buyer2LiveInProperty.new(nil, nil, self),
@@ -52,78 +52,78 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Sales::Pages::NumberOfOthersInProperty.new("number_of_others_in_property_joint_purchase", nil, self, joint_purchase: true),
Form::Sales::Pages::PersonKnown.new("person_2_known", nil, self, person_index: 2),
Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_2_relationship_to_buyer_1", nil, self, person_index: 2),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
- (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_2_multiple_partners_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_2_multiple_partners_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("relationship_2_student_not_child_value_check", nil, self, person_index: 2),
Form::Sales::Pages::PersonAge.new("person_2_age", nil, self, person_index: 2),
Form::Sales::Pages::RetirementValueCheck.new("age_2_retirement_value_check", nil, self, person_index: 2),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_2_not_retired_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_2_not_retired_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("age_2_student_not_child_value_check", nil, self, person_index: 2),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_2_partner_under_16_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonGenderIdentity.new("person_2_gender_identity", nil, self, person_index: 2),
Form::Sales::Pages::PersonWorkingSituation.new("person_2_working_situation", nil, self, person_index: 2),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check", nil, self, person_index: 2),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_2_not_retired_value_check", nil, self, person_index: 2) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_2_not_retired_value_check", nil, self, person_index: 2) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("working_situation_2_student_not_child_value_check", nil, self, person_index: 2),
Form::Sales::Pages::PersonKnown.new("person_3_known", nil, self, person_index: 3),
Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_3_relationship_to_buyer_1", nil, self, person_index: 3),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
- (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_3_multiple_partners_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_3_multiple_partners_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("relationship_3_student_not_child_value_check", nil, self, person_index: 3),
Form::Sales::Pages::PersonAge.new("person_3_age", nil, self, person_index: 3),
Form::Sales::Pages::RetirementValueCheck.new("age_3_retirement_value_check", nil, self, person_index: 3),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_3_not_retired_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_3_not_retired_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("age_3_student_not_child_value_check", nil, self, person_index: 3),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_3_partner_under_16_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonGenderIdentity.new("person_3_gender_identity", nil, self, person_index: 3),
Form::Sales::Pages::PersonWorkingSituation.new("person_3_working_situation", nil, self, person_index: 3),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_3_retirement_value_check", nil, self, person_index: 3),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_3_not_retired_value_check", nil, self, person_index: 3) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_3_not_retired_value_check", nil, self, person_index: 3) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("working_situation_3_student_not_child_value_check", nil, self, person_index: 3),
Form::Sales::Pages::PersonKnown.new("person_4_known", nil, self, person_index: 4),
Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_4_relationship_to_buyer_1", nil, self, person_index: 4),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
- (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_4_multiple_partners_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_4_multiple_partners_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("relationship_4_student_not_child_value_check", nil, self, person_index: 4),
Form::Sales::Pages::PersonAge.new("person_4_age", nil, self, person_index: 4),
Form::Sales::Pages::RetirementValueCheck.new("age_4_retirement_value_check", nil, self, person_index: 4),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_4_not_retired_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_4_not_retired_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("age_4_student_not_child_value_check", nil, self, person_index: 4),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_4_partner_under_16_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonGenderIdentity.new("person_4_gender_identity", nil, self, person_index: 4),
Form::Sales::Pages::PersonWorkingSituation.new("person_4_working_situation", nil, self, person_index: 4),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_4_retirement_value_check", nil, self, person_index: 4),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_4_not_retired_value_check", nil, self, person_index: 4) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_4_not_retired_value_check", nil, self, person_index: 4) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("working_situation_4_student_not_child_value_check", nil, self, person_index: 4),
Form::Sales::Pages::PersonKnown.new("person_5_known", nil, self, person_index: 5),
Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_5_relationship_to_buyer_1", nil, self, person_index: 5),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
- (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_5_multiple_partners_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_5_multiple_partners_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("relationship_5_student_not_child_value_check", nil, self, person_index: 5),
Form::Sales::Pages::PersonAge.new("person_5_age", nil, self, person_index: 5),
Form::Sales::Pages::RetirementValueCheck.new("age_5_retirement_value_check", nil, self, person_index: 5),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_5_not_retired_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_5_not_retired_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("age_5_student_not_child_value_check", nil, self, person_index: 5),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_5_partner_under_16_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonGenderIdentity.new("person_5_gender_identity", nil, self, person_index: 5),
Form::Sales::Pages::PersonWorkingSituation.new("person_5_working_situation", nil, self, person_index: 5),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_5_retirement_value_check", nil, self, person_index: 5),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_5_not_retired_value_check", nil, self, person_index: 5) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_5_not_retired_value_check", nil, self, person_index: 5) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("working_situation_5_student_not_child_value_check", nil, self, person_index: 5),
Form::Sales::Pages::PersonKnown.new("person_6_known", nil, self, person_index: 6),
Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_6_relationship_to_buyer_1", nil, self, person_index: 6),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
- (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_6_multiple_partners_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("relationship_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::MultiplePartnersValueCheck.new("relationship_6_multiple_partners_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("relationship_6_student_not_child_value_check", nil, self, person_index: 6),
Form::Sales::Pages::PersonAge.new("person_6_age", nil, self, person_index: 6),
Form::Sales::Pages::RetirementValueCheck.new("age_6_retirement_value_check", nil, self, person_index: 6),
- (Form::Sales::Pages::NotRetiredValueCheck.new("age_6_not_retired_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("age_6_not_retired_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("age_6_student_not_child_value_check", nil, self, person_index: 6),
- (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
+ (Form::Sales::Pages::PartnerUnder16ValueCheck.new("age_6_partner_under_16_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonGenderIdentity.new("person_6_gender_identity", nil, self, person_index: 6),
Form::Sales::Pages::PersonWorkingSituation.new("person_6_working_situation", nil, self, person_index: 6),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_6_retirement_value_check", nil, self, person_index: 6),
- (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_6_not_retired_value_check", nil, self, person_index: 6) if form.start_year_after_2024?),
+ (Form::Sales::Pages::NotRetiredValueCheck.new("working_situation_6_not_retired_value_check", nil, self, person_index: 6) if form.start_year_2024_or_later?),
Form::Sales::Pages::PersonStudentNotChildValueCheck.new("working_situation_6_student_not_child_value_check", nil, self, person_index: 6),
].flatten.compact
end
diff --git a/app/models/form/sales/subsections/outright_sale.rb b/app/models/form/sales/subsections/outright_sale.rb
index 6b29313a1..af63c8179 100644
--- a/app/models/form/sales/subsections/outright_sale.rb
+++ b/app/models/form/sales/subsections/outright_sale.rb
@@ -14,8 +14,8 @@ class Form::Sales::Subsections::OutrightSale < ::Form::Subsection
Form::Sales::Pages::MortgageValueCheck.new("outright_sale_mortgage_used_mortgage_value_check", nil, self),
Form::Sales::Pages::MortgageAmount.new("mortgage_amount_outright_sale", nil, self, ownershipsch: 3),
Form::Sales::Pages::MortgageValueCheck.new("outright_sale_mortgage_amount_mortgage_value_check", nil, self),
- (Form::Sales::Pages::MortgageLender.new("mortgage_lender_outright_sale", nil, self, ownershipsch: 3) unless form.start_year_after_2024?),
- (Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_outright_sale", nil, self, ownershipsch: 3) unless form.start_year_after_2024?),
+ (Form::Sales::Pages::MortgageLender.new("mortgage_lender_outright_sale", nil, self, ownershipsch: 3) unless form.start_year_2024_or_later?),
+ (Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_outright_sale", nil, self, ownershipsch: 3) unless form.start_year_2024_or_later?),
Form::Sales::Pages::MortgageLength.new("mortgage_length_outright_sale", nil, self, ownershipsch: 3),
Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_outright_sale", nil, self, ownershipsch: 3),
Form::Sales::Pages::Deposit.new("deposit_outright_sale", nil, self, ownershipsch: 3, optional: false),
diff --git a/app/models/form/sales/subsections/property_information.rb b/app/models/form/sales/subsections/property_information.rb
index c59c159ae..32df98af5 100644
--- a/app/models/form/sales/subsections/property_information.rb
+++ b/app/models/form/sales/subsections/property_information.rb
@@ -21,7 +21,7 @@ class Form::Sales::Subsections::PropertyInformation < ::Form::Subsection
end
def uprn_questions
- if form.start_year_after_2024?
+ if form.start_year_2024_or_later?
[
Form::Sales::Pages::Uprn.new(nil, nil, self),
Form::Sales::Pages::UprnConfirmation.new(nil, nil, self),
diff --git a/app/models/form/sales/subsections/setup.rb b/app/models/form/sales/subsections/setup.rb
index f954e24e6..de623e769 100644
--- a/app/models/form/sales/subsections/setup.rb
+++ b/app/models/form/sales/subsections/setup.rb
@@ -20,10 +20,10 @@ class Form::Sales::Subsections::Setup < ::Form::Subsection
Form::Sales::Pages::BuyerLive.new(nil, nil, self),
Form::Sales::Pages::JointPurchase.new(nil, nil, self),
Form::Sales::Pages::NumberJointBuyers.new(nil, nil, self),
- (Form::Sales::Pages::BuyerInterview.new("buyer_interview_joint_purchase", nil, self, joint_purchase: true) if form.start_year_after_2024?),
- (Form::Sales::Pages::BuyerInterview.new("buyer_interview", nil, self, joint_purchase: false) if form.start_year_after_2024?),
- (Form::Sales::Pages::PrivacyNotice.new("privacy_notice_joint_purchase", nil, self, joint_purchase: true) if form.start_year_after_2024?),
- (Form::Sales::Pages::PrivacyNotice.new("privacy_notice", nil, self, joint_purchase: false) if form.start_year_after_2024?),
+ (Form::Sales::Pages::BuyerInterview.new("buyer_interview_joint_purchase", nil, self, joint_purchase: true) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::BuyerInterview.new("buyer_interview", nil, self, joint_purchase: false) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::PrivacyNotice.new("privacy_notice_joint_purchase", nil, self, joint_purchase: true) if form.start_year_2024_or_later?),
+ (Form::Sales::Pages::PrivacyNotice.new("privacy_notice", nil, self, joint_purchase: false) if form.start_year_2024_or_later?),
].flatten.compact
end
end
diff --git a/app/models/form/sales/subsections/shared_ownership_scheme.rb b/app/models/form/sales/subsections/shared_ownership_scheme.rb
index c955929dc..3fba8ef70 100644
--- a/app/models/form/sales/subsections/shared_ownership_scheme.rb
+++ b/app/models/form/sales/subsections/shared_ownership_scheme.rb
@@ -40,11 +40,11 @@ class Form::Sales::Subsections::SharedOwnershipScheme < ::Form::Subsection
Form::Sales::Pages::MortgageLength.new("mortgage_length_shared_ownership", nil, self, ownershipsch: 1),
Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_shared_ownership", nil, self, ownershipsch: 1),
Form::Sales::Pages::Deposit.new("deposit_shared_ownership", nil, self, ownershipsch: 1, optional: false),
- (Form::Sales::Pages::Deposit.new("deposit_shared_ownership_optional", nil, self, ownershipsch: 1, optional: true) if form.start_year_after_2024?),
+ (Form::Sales::Pages::Deposit.new("deposit_shared_ownership_optional", nil, self, ownershipsch: 1, optional: true) if form.start_year_2024_or_later?),
Form::Sales::Pages::DepositValueCheck.new("deposit_joint_purchase_value_check", nil, self, joint_purchase: true),
Form::Sales::Pages::DepositValueCheck.new("deposit_value_check", nil, self, joint_purchase: false),
Form::Sales::Pages::DepositDiscount.new("deposit_discount", nil, self, optional: false),
- (Form::Sales::Pages::DepositDiscount.new("deposit_discount_optional", nil, self, optional: true) if form.start_year_after_2024?),
+ (Form::Sales::Pages::DepositDiscount.new("deposit_discount_optional", nil, self, optional: true) if form.start_year_2024_or_later?),
Form::Sales::Pages::SharedOwnershipDepositValueCheck.new("shared_ownership_deposit_value_check", nil, self),
Form::Sales::Pages::MonthlyRent.new(nil, nil, self),
Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_shared_ownership", nil, self, ownershipsch: 1),
diff --git a/app/models/lettings_log.rb b/app/models/lettings_log.rb
index 7cab576c4..d8732c3ea 100644
--- a/app/models/lettings_log.rb
+++ b/app/models/lettings_log.rb
@@ -391,7 +391,7 @@ class LettingsLog < Log
end
def is_beds_inferred?
- form.start_year_after_2024? && is_bedsit?
+ form.start_year_2024_or_later? && is_bedsit?
end
def is_shared_housing?
@@ -899,7 +899,7 @@ private
def should_process_address_change?
return unless uprn_selection || select_best_address_match
return unless startdate
- return unless form.start_year_after_2024?
+ return unless form.start_year_2024_or_later?
if select_best_address_match
address_line1_input.present? && postcode_full_input.present?
diff --git a/app/models/sales_log.rb b/app/models/sales_log.rb
index aca80ef94..23438142f 100644
--- a/app/models/sales_log.rb
+++ b/app/models/sales_log.rb
@@ -131,7 +131,7 @@ class SalesLog < Log
not_required << "proplen" if proplen_optional?
not_required << "mortlen" if mortlen_optional?
not_required << "frombeds" if frombeds_optional?
- not_required << "deposit" if form.start_year_after_2024? && stairowned_100?
+ not_required << "deposit" if form.start_year_2024_or_later? && stairowned_100?
not_required |= %w[address_line2 county postcode_full] if saledate && collection_start_year_for_date(saledate) >= 2023
@@ -453,7 +453,7 @@ class SalesLog < Log
def should_process_address_change?
return unless uprn_selection || select_best_address_match
return unless saledate
- return unless form.start_year_after_2024?
+ return unless form.start_year_2024_or_later?
if select_best_address_match
address_line1_input.present? && postcode_full_input.present?
@@ -515,7 +515,7 @@ class SalesLog < Log
end
def soctenant_is_inferred?
- form.start_year_after_2024?
+ form.start_year_2024_or_later?
end
def duplicates
diff --git a/app/models/validations/household_validations.rb b/app/models/validations/household_validations.rb
index 8fe940ae5..626925631 100644
--- a/app/models/validations/household_validations.rb
+++ b/app/models/validations/household_validations.rb
@@ -35,7 +35,7 @@ module Validations::HouseholdValidations
record.errors.add :reason, I18n.t("validations.household.reason.not_internal_transfer")
end
- return unless record.form.start_year_after_2024?
+ return unless record.form.start_year_2024_or_later?
if record.reason == 20 && PHRASES_INDICATING_HOMELESSNESS_REGEX.match?(record.reasonother)
record.errors.add :reason, I18n.t("validations.household.reason.other_not_settled")
@@ -56,7 +56,7 @@ module Validations::HouseholdValidations
end
def validate_person_1_economic(record)
- return unless record.age1 && record.ecstat1 && !record.form.start_year_after_2024?
+ return unless record.age1 && record.ecstat1 && !record.form.start_year_2024_or_later?
if record.age1 < 16 && !economic_status_is_child_other_or_refused?(record.ecstat1)
record.errors.add "ecstat1", I18n.t("validations.household.ecstat.child_under_16", person_num: 1)
@@ -74,7 +74,7 @@ module Validations::HouseholdValidations
economic_status = record.public_send("ecstat#{person_num}")
next unless age && economic_status
- if age < 16 && !economic_status_is_child_other_or_refused?(economic_status) && !record.form.start_year_after_2024?
+ if age < 16 && !economic_status_is_child_other_or_refused?(economic_status) && !record.form.start_year_2024_or_later?
record.errors.add "ecstat#{person_num}", I18n.t("validations.household.ecstat.child_under_16", person_num:)
record.errors.add "age#{person_num}", I18n.t("validations.household.age.child_under_16_ecstat", person_num:)
end
@@ -86,7 +86,7 @@ module Validations::HouseholdValidations
end
def validate_person_age_matches_relationship(record)
- return unless record.startdate && !record.form.start_year_after_2024?
+ return unless record.startdate && !record.form.start_year_2024_or_later?
(2..8).each do |person_num|
age = record.public_send("age#{person_num}")
@@ -101,7 +101,7 @@ module Validations::HouseholdValidations
end
def validate_person_age_and_relationship_matches_economic_status(record)
- return unless record.startdate && !record.form.start_year_after_2024?
+ return unless record.startdate && !record.form.start_year_2024_or_later?
(2..8).each do |person_num|
age = record.public_send("age#{person_num}")
diff --git a/app/models/validations/property_validations.rb b/app/models/validations/property_validations.rb
index 52afecb49..e0246ff1f 100644
--- a/app/models/validations/property_validations.rb
+++ b/app/models/validations/property_validations.rb
@@ -35,7 +35,7 @@ module Validations::PropertyValidations
def validate_shared_housing_rooms(record)
return unless record.unittype_gn
- if record.is_bedsit? && record.beds != 1 && record.beds.present? && !record.form.start_year_after_2024?
+ if record.is_bedsit? && record.beds != 1 && record.beds.present? && !record.form.start_year_2024_or_later?
record.errors.add :unittype_gn, I18n.t("validations.property.unittype_gn.one_bedroom_bedsit")
record.errors.add :beds, I18n.t("validations.property.unittype_gn.one_bedroom_bedsit")
end
diff --git a/app/models/validations/sales/financial_validations.rb b/app/models/validations/sales/financial_validations.rb
index 9a119475f..c1046e035 100644
--- a/app/models/validations/sales/financial_validations.rb
+++ b/app/models/validations/sales/financial_validations.rb
@@ -54,7 +54,7 @@ module Validations::Sales::FinancialValidations
def validate_percentage_bought_not_equal_percentage_owned(record)
return unless record.stairbought && record.stairowned
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
if record.stairbought == record.stairowned
record.errors.add :stairbought, I18n.t("validations.financial.staircasing.percentage_bought_equal_percentage_owned", stairbought: sprintf("%g", record.stairbought), stairowned: sprintf("%g", record.stairowned))
@@ -105,7 +105,7 @@ module Validations::Sales::FinancialValidations
def validate_equity_less_than_staircase_difference(record)
return unless record.equity && record.stairbought && record.stairowned
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
if record.equity > record.stairowned - record.stairbought
formatted_equity = sprintf("%g", record.equity)
diff --git a/app/models/validations/sales/household_validations.rb b/app/models/validations/sales/household_validations.rb
index fb1ea65c2..23b2e9ee1 100644
--- a/app/models/validations/sales/household_validations.rb
+++ b/app/models/validations/sales/household_validations.rb
@@ -16,7 +16,7 @@ module Validations::Sales::HouseholdValidations
end
def validate_buyer1_previous_tenure(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.discounted_ownership_sale? && record.prevten
if [3, 4, 5, 6, 7, 9, 0].include?(record.prevten)
@@ -26,7 +26,7 @@ module Validations::Sales::HouseholdValidations
end
def validate_person_age_matches_relationship(record)
- return unless record.saledate && !record.form.start_year_after_2024?
+ return unless record.saledate && !record.form.start_year_2024_or_later?
(2..6).each do |person_num|
age = record.public_send("age#{person_num}")
@@ -44,7 +44,7 @@ module Validations::Sales::HouseholdValidations
end
def validate_person_age_and_relationship_matches_economic_status(record)
- return unless record.saledate && !record.form.start_year_after_2024?
+ return unless record.saledate && !record.form.start_year_2024_or_later?
(2..6).each do |person_num|
age = record.public_send("age#{person_num}")
@@ -77,7 +77,7 @@ module Validations::Sales::HouseholdValidations
economic_status = record.public_send("ecstat#{person_num}")
next unless age && economic_status
- if age < 16 && !economic_status_is_child_other_or_refused?(economic_status) && !record.form.start_year_after_2024?
+ if age < 16 && !economic_status_is_child_other_or_refused?(economic_status) && !record.form.start_year_2024_or_later?
record.errors.add "ecstat#{person_num}", I18n.t("validations.sales.household.ecstat.child_under_16", person_num:)
record.errors.add "age#{person_num}", I18n.t("validations.sales.household.age.child_under_16_ecstat", person_num:)
end
@@ -89,7 +89,7 @@ module Validations::Sales::HouseholdValidations
end
def validate_child_12_years_younger(record)
- return unless record.saledate && !record.form.start_year_after_2024?
+ return unless record.saledate && !record.form.start_year_2024_or_later?
(2..6).each do |person_num|
buyer_1_age = record.public_send("age1")
@@ -106,7 +106,7 @@ module Validations::Sales::HouseholdValidations
end
def validate_buyer_not_child(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
record.errors.add "ecstat1", I18n.t("validations.sales.household.ecstat1.buyer_cannot_be_child") if person_is_economic_child?(record.ecstat1)
record.errors.add "ecstat2", I18n.t("validations.sales.household.ecstat2.buyer_cannot_be_child") if person_is_economic_child?(record.ecstat2) && record.joint_purchase?
diff --git a/app/models/validations/sales/property_validations.rb b/app/models/validations/sales/property_validations.rb
index 59d616c9a..c4a42c630 100644
--- a/app/models/validations/sales/property_validations.rb
+++ b/app/models/validations/sales/property_validations.rb
@@ -1,6 +1,6 @@
module Validations::Sales::PropertyValidations
def validate_postcodes_match_if_discounted_ownership(record)
- return unless record.saledate && !record.form.start_year_after_2024?
+ return unless record.saledate && !record.form.start_year_2024_or_later?
return unless record.ppostcode_full.present? && record.postcode_full.present?
if record.discounted_ownership_sale? && record.ppostcode_full != record.postcode_full
diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb
index 700867e66..3c5e3f2b9 100644
--- a/app/models/validations/sales/sale_information_validations.rb
+++ b/app/models/validations/sales/sale_information_validations.rb
@@ -12,7 +12,7 @@ module Validations::Sales::SaleInformationValidations
record.errors.add :saledate, I18n.t("validations.sales.sale_information.saledate.must_be_after_hodate")
end
- if record.saledate - record.hodate >= 3.years && record.form.start_year_after_2024?
+ if record.saledate - record.hodate >= 3.years && record.form.start_year_2024_or_later?
record.errors.add :hodate, I18n.t("validations.sales.sale_information.hodate.must_be_less_than_3_years_from_saledate")
record.errors.add :saledate, I18n.t("validations.sales.sale_information.saledate.must_be_less_than_3_years_from_hodate")
end
@@ -42,7 +42,7 @@ module Validations::Sales::SaleInformationValidations
end
def validate_discounted_ownership_value(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.value && record.deposit && record.ownershipsch
return unless record.mortgage || record.mortgageused == 2 || record.mortgageused == 3
return unless record.discount || record.grant || record.type == 29
@@ -65,7 +65,7 @@ module Validations::Sales::SaleInformationValidations
end
def validate_outright_sale_value_matches_mortgage_plus_deposit(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.outright_sale?
return unless record.mortgage_used? && record.mortgage
return unless record.deposit && record.value
@@ -96,7 +96,7 @@ module Validations::Sales::SaleInformationValidations
end
def validate_grant_amount(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.grant && (record.type == 8 || record.type == 21)
unless record.grant.between?(9_000, 16_000)
@@ -106,7 +106,7 @@ module Validations::Sales::SaleInformationValidations
def validate_stairbought(record)
return unless record.stairbought && record.type
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
max_stairbought = case record.type
when 30, 16, 28, 31, 32
@@ -124,7 +124,7 @@ module Validations::Sales::SaleInformationValidations
end
def validate_discount_and_value(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.discount && record.value && record.la
if record.london_property? && record.discount_value > 136_400
@@ -139,7 +139,7 @@ module Validations::Sales::SaleInformationValidations
end
def validate_non_staircasing_mortgage(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.value && record.deposit && record.equity
return unless record.shared_ownership_scheme? && record.type && record.mortgageused && record.is_not_staircasing?
@@ -151,7 +151,7 @@ module Validations::Sales::SaleInformationValidations
end
def validate_staircasing_mortgage(record)
- return unless record.saledate && record.form.start_year_after_2024?
+ return unless record.saledate && record.form.start_year_2024_or_later?
return unless record.value && record.deposit && record.stairbought
return unless record.shared_ownership_scheme? && record.type && record.mortgageused && record.is_staircase?
@@ -334,7 +334,7 @@ module Validations::Sales::SaleInformationValidations
if record.discounted_ownership_sale?
record.errors.add :mortgageused, I18n.t("validations.invalid_option", question: "was a mortgage used for the purchase of this property?")
end
- if record.outright_sale? && record.saledate && !record.form.start_year_after_2024?
+ if record.outright_sale? && record.saledate && !record.form.start_year_2024_or_later?
record.errors.add :mortgageused, I18n.t("validations.invalid_option", question: "was a mortgage used for the purchase of this property?")
record.errors.add :saledate, I18n.t("validations.sales.sale_information.saledate.mortgage_used_year")
end
diff --git a/app/models/validations/sales/soft_validations.rb b/app/models/validations/sales/soft_validations.rb
index fccd9bf83..fe05ec13c 100644
--- a/app/models/validations/sales/soft_validations.rb
+++ b/app/models/validations/sales/soft_validations.rb
@@ -68,7 +68,7 @@ module Validations::Sales::SoftValidations
end
def extra_borrowing_expected_but_not_reported?
- return unless saledate && !form.start_year_after_2024?
+ return unless saledate && !form.start_year_2024_or_later?
return unless extrabor && mortgage && deposit && value && discount
extrabor != 1 && mortgage + deposit > value - value * discount / 100
@@ -118,7 +118,7 @@ module Validations::Sales::SoftValidations
def grant_outside_common_range?
return unless grant && type && saledate
- return if form.start_year_after_2024? && (type == 21 || type == 8)
+ return if form.start_year_2024_or_later? && (type == 21 || type == 8)
!grant.between?(9_000, 16_000)
end
diff --git a/app/models/validations/shared_validations.rb b/app/models/validations/shared_validations.rb
index a2ae916c1..2eb5fff5a 100644
--- a/app/models/validations/shared_validations.rb
+++ b/app/models/validations/shared_validations.rb
@@ -126,7 +126,7 @@ module Validations::SharedValidations
end
def shared_validate_partner_count(record, max_people)
- return if record.form.start_year_after_2024?
+ return if record.form.start_year_2024_or_later?
partner_numbers = (2..max_people).select { |n| person_is_partner?(record["relat#{n}"]) }
if partner_numbers.count > 1
diff --git a/app/services/exports/lettings_log_export_service.rb b/app/services/exports/lettings_log_export_service.rb
index b21099a06..97f495e0c 100644
--- a/app/services/exports/lettings_log_export_service.rb
+++ b/app/services/exports/lettings_log_export_service.rb
@@ -146,8 +146,8 @@ module Exports
field_name.starts_with?(details_known_prefix) ||
pattern_age.match(field_name) ||
!EXPORT_FIELDS.include?(field_name) ||
- (lettings_log.form.start_year_after_2024? && PRE_2024_EXPORT_FIELDS.include?(field_name)) ||
- (!lettings_log.form.start_year_after_2024? && POST_2024_EXPORT_FIELDS.include?(field_name))
+ (lettings_log.form.start_year_2024_or_later? && PRE_2024_EXPORT_FIELDS.include?(field_name)) ||
+ (!lettings_log.form.start_year_2024_or_later? && POST_2024_EXPORT_FIELDS.include?(field_name))
end
def build_export_xml(lettings_logs)
diff --git a/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb b/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
index b095af406..43dc70378 100644
--- a/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
+++ b/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::FirstTimePropertyLetAsSocialHousing, type:
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb b/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
index 1f2986064..b75e57674 100644
--- a/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
+++ b/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/person_age_spec.rb b/spec/models/form/lettings/pages/person_age_spec.rb
index dfcc82406..2043052fd 100644
--- a/spec/models/form/lettings/pages/person_age_spec.rb
+++ b/spec/models/form/lettings/pages/person_age_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonAge, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: false)) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb b/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
index a0ebb9cbc..829d55ad0 100644
--- a/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
+++ b/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonRelationshipToLead, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: false)) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/previous_local_authority_spec.rb b/spec/models/form/lettings/pages/previous_local_authority_spec.rb
index 9e6d91be3..37ae11133 100644
--- a/spec/models/form/lettings/pages/previous_local_authority_spec.rb
+++ b/spec/models/form/lettings/pages/previous_local_authority_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PreviousLocalAuthority, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1))) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/previous_postcode_spec.rb b/spec/models/form/lettings/pages/previous_postcode_spec.rb
index eba9af065..354f78a98 100644
--- a/spec/models/form/lettings/pages/previous_postcode_spec.rb
+++ b/spec/models/form/lettings/pages/previous_postcode_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PreviousPostcode, type: :model do
let(:page_id) { "previous_postcode" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1))) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/property_local_authority_spec.rb b/spec/models/form/lettings/pages/property_local_authority_spec.rb
index fe5363d97..75d680ddd 100644
--- a/spec/models/form/lettings/pages/property_local_authority_spec.rb
+++ b/spec/models/form/lettings/pages/property_local_authority_spec.rb
@@ -37,7 +37,7 @@ RSpec.describe Form::Lettings::Pages::PropertyLocalAuthority, type: :model do
context "with form before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "is routed to when la is not inferred and it is general needs log" do
@@ -61,7 +61,7 @@ RSpec.describe Form::Lettings::Pages::PropertyLocalAuthority, type: :model do
context "with form after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "is routed to when la is not inferred, it is general needs log and address search has been given" do
diff --git a/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb b/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
index 90da08fb6..8090c6ed4 100644
--- a/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Pages::PropertyWheelchairAccessible, type: :model
let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/renewal_spec.rb b/spec/models/form/lettings/pages/renewal_spec.rb
index edeeaff1b..77ba3aec8 100644
--- a/spec/models/form/lettings/pages/renewal_spec.rb
+++ b/spec/models/form/lettings/pages/renewal_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::Renewal, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/rent_type_spec.rb b/spec/models/form/lettings/pages/rent_type_spec.rb
index 41dc0a1a9..3cec8e01e 100644
--- a/spec/models/form/lettings/pages/rent_type_spec.rb
+++ b/spec/models/form/lettings/pages/rent_type_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Pages::RentType, type: :model do
before do
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb b/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
index 6842f7d3e..005b546a8 100644
--- a/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
+++ b/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Pages::StarterTenancyType, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/pages/uprn_spec.rb b/spec/models/form/lettings/pages/uprn_spec.rb
index 2ab83c76a..81f1aec40 100644
--- a/spec/models/form/lettings/pages/uprn_spec.rb
+++ b/spec/models/form/lettings/pages/uprn_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Pages::Uprn, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
@@ -57,7 +57,7 @@ RSpec.describe Form::Lettings::Pages::Uprn, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "points to address search page" do
diff --git a/spec/models/form/lettings/questions/age1_known_spec.rb b/spec/models/form/lettings/questions/age1_known_spec.rb
index 6ec594359..94c36d3d5 100644
--- a/spec/models/form/lettings/questions/age1_known_spec.rb
+++ b/spec/models/form/lettings/questions/age1_known_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Age1Known, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/age_spec.rb b/spec/models/form/lettings/questions/age_spec.rb
index e456007f7..639f695fd 100644
--- a/spec/models/form/lettings/questions/age_spec.rb
+++ b/spec/models/form/lettings/questions/age_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Questions::Age, type: :model do
subject(:question) { described_class.new(nil, question_definition, page, person_index:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/declaration_spec.rb b/spec/models/form/lettings/questions/declaration_spec.rb
index fe1ae882d..25705414c 100644
--- a/spec/models/form/lettings/questions/declaration_spec.rb
+++ b/spec/models/form/lettings/questions/declaration_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?)
+ allow(form).to receive(:start_year_2024_or_later?)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -33,7 +33,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
context "when the form year is before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -57,7 +57,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
context "when the form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/ethnic_white_spec.rb b/spec/models/form/lettings/questions/ethnic_white_spec.rb
index 7857893a1..ab20dd8ca 100644
--- a/spec/models/form/lettings/questions/ethnic_white_spec.rb
+++ b/spec/models/form/lettings/questions/ethnic_white_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb b/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
index 7f38f0108..756f5e84e 100644
--- a/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
+++ b/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing, t
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -34,7 +34,7 @@ RSpec.describe Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing, t
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/gender_identity1_spec.rb b/spec/models/form/lettings/questions/gender_identity1_spec.rb
index 2a943cbe0..19503ea33 100644
--- a/spec/models/form/lettings/questions/gender_identity1_spec.rb
+++ b/spec/models/form/lettings/questions/gender_identity1_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::GenderIdentity1, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
before do
allow(page).to receive(:subsection).and_return(subsection)
diff --git a/spec/models/form/lettings/questions/hb_spec.rb b/spec/models/form/lettings/questions/hb_spec.rb
index ed8f19cd5..9a1477954 100644
--- a/spec/models/form/lettings/questions/hb_spec.rb
+++ b/spec/models/form/lettings/questions/hb_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Hb, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/housingneeds_other_spec.rb b/spec/models/form/lettings/questions/housingneeds_other_spec.rb
index f7be373e1..ead58bb35 100644
--- a/spec/models/form/lettings/questions/housingneeds_other_spec.rb
+++ b/spec/models/form/lettings/questions/housingneeds_other_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::HousingneedsOther, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -42,7 +42,7 @@ RSpec.describe Form::Lettings::Questions::HousingneedsOther, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/is_carehome_spec.rb b/spec/models/form/lettings/questions/is_carehome_spec.rb
index 958873599..b82ddeaeb 100644
--- a/spec/models/form/lettings/questions/is_carehome_spec.rb
+++ b/spec/models/form/lettings/questions/is_carehome_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::IsCarehome, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -42,7 +42,7 @@ RSpec.describe Form::Lettings::Questions::IsCarehome, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options in the correct order" do
diff --git a/spec/models/form/lettings/questions/joint_spec.rb b/spec/models/form/lettings/questions/joint_spec.rb
index 1207d97d4..d856e9c18 100644
--- a/spec/models/form/lettings/questions/joint_spec.rb
+++ b/spec/models/form/lettings/questions/joint_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Joint, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/layear_spec.rb b/spec/models/form/lettings/questions/layear_spec.rb
index 04296beae..5ea537514 100644
--- a/spec/models/form/lettings/questions/layear_spec.rb
+++ b/spec/models/form/lettings/questions/layear_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Layear, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -49,7 +49,7 @@ RSpec.describe Form::Lettings::Questions::Layear, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/letting_allocation_spec.rb b/spec/models/form/lettings/questions/letting_allocation_spec.rb
index 63c750e5d..980c8fea5 100644
--- a/spec/models/form/lettings/questions/letting_allocation_spec.rb
+++ b/spec/models/form/lettings/questions/letting_allocation_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::LettingAllocation, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -45,7 +45,7 @@ RSpec.describe Form::Lettings::Questions::LettingAllocation, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/person_relationship_spec.rb b/spec/models/form/lettings/questions/person_relationship_spec.rb
index 20d05e316..0023c60ef 100644
--- a/spec/models/form/lettings/questions/person_relationship_spec.rb
+++ b/spec/models/form/lettings/questions/person_relationship_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Questions::PersonRelationship, type: :model do
subject(:question) { described_class.new(nil, question_definition, page, person_index:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/ppcodenk_spec.rb b/spec/models/form/lettings/questions/ppcodenk_spec.rb
index 8a29b032d..7186875d3 100644
--- a/spec/models/form/lettings/questions/ppcodenk_spec.rb
+++ b/spec/models/form/lettings/questions/ppcodenk_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Ppcodenk, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/previous_la_known_spec.rb b/spec/models/form/lettings/questions/previous_la_known_spec.rb
index defb56bdf..f05d376ab 100644
--- a/spec/models/form/lettings/questions/previous_la_known_spec.rb
+++ b/spec/models/form/lettings/questions/previous_la_known_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLaKnown, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/previous_let_type_spec.rb b/spec/models/form/lettings/questions/previous_let_type_spec.rb
index 0739fe386..95c1451cd 100644
--- a/spec/models/form/lettings/questions/previous_let_type_spec.rb
+++ b/spec/models/form/lettings/questions/previous_let_type_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
context "with collection year on or after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer options" do
diff --git a/spec/models/form/lettings/questions/reason_renewal_spec.rb b/spec/models/form/lettings/questions/reason_renewal_spec.rb
index 3cdff75e7..e58a33a21 100644
--- a/spec/models/form/lettings/questions/reason_renewal_spec.rb
+++ b/spec/models/form/lettings/questions/reason_renewal_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -54,7 +54,7 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/reason_spec.rb b/spec/models/form/lettings/questions/reason_spec.rb
index 0b82eca42..4b71ee176 100644
--- a/spec/models/form/lettings/questions/reason_spec.rb
+++ b/spec/models/form/lettings/questions/reason_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -84,7 +84,7 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/reasonpref_spec.rb b/spec/models/form/lettings/questions/reasonpref_spec.rb
index 5957d4979..43326b7c0 100644
--- a/spec/models/form/lettings/questions/reasonpref_spec.rb
+++ b/spec/models/form/lettings/questions/reasonpref_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Reasonpref, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/referral_prp_spec.rb b/spec/models/form/lettings/questions/referral_prp_spec.rb
index e11bf250c..a10b6d383 100644
--- a/spec/models/form/lettings/questions/referral_prp_spec.rb
+++ b/spec/models/form/lettings/questions/referral_prp_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReferralPrp, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -64,7 +64,7 @@ RSpec.describe Form::Lettings::Questions::ReferralPrp, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/referral_spec.rb b/spec/models/form/lettings/questions/referral_spec.rb
index b3f526697..75e6c2f42 100644
--- a/spec/models/form/lettings/questions/referral_spec.rb
+++ b/spec/models/form/lettings/questions/referral_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Referral, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -62,7 +62,7 @@ RSpec.describe Form::Lettings::Questions::Referral, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb b/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb
index ab13acd26..3059c122d 100644
--- a/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb
+++ b/spec/models/form/lettings/questions/referral_supported_housing_prp_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousingPrp, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -64,7 +64,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousingPrp, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/referral_supported_housing_spec.rb b/spec/models/form/lettings/questions/referral_supported_housing_spec.rb
index 5e05bf65b..5a4af55e5 100644
--- a/spec/models/form/lettings/questions/referral_supported_housing_spec.rb
+++ b/spec/models/form/lettings/questions/referral_supported_housing_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousing, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -62,7 +62,7 @@ RSpec.describe Form::Lettings::Questions::ReferralSupportedHousing, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/renewal_spec.rb b/spec/models/form/lettings/questions/renewal_spec.rb
index 27fe1bf86..af2c22c15 100644
--- a/spec/models/form/lettings/questions/renewal_spec.rb
+++ b/spec/models/form/lettings/questions/renewal_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Renewal, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/rent_type_spec.rb b/spec/models/form/lettings/questions/rent_type_spec.rb
index 0716cdbf7..7d45320ad 100644
--- a/spec/models/form/lettings/questions/rent_type_spec.rb
+++ b/spec/models/form/lettings/questions/rent_type_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct page" do
@@ -37,7 +37,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
context "when 2023" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -58,7 +58,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
context "when 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/rsnvac_spec.rb b/spec/models/form/lettings/questions/rsnvac_spec.rb
index 45469cebb..5eb37ddb5 100644
--- a/spec/models/form/lettings/questions/rsnvac_spec.rb
+++ b/spec/models/form/lettings/questions/rsnvac_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::Rsnvac, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -78,7 +78,7 @@ RSpec.describe Form::Lettings::Questions::Rsnvac, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/scheme_id_spec.rb b/spec/models/form/lettings/questions/scheme_id_spec.rb
index c490cded4..ba5734b3b 100644
--- a/spec/models/form/lettings/questions/scheme_id_spec.rb
+++ b/spec/models/form/lettings/questions/scheme_id_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Form::Lettings::Questions::SchemeId, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/sheltered_spec.rb b/spec/models/form/lettings/questions/sheltered_spec.rb
index 33b1007d2..1f21a92eb 100644
--- a/spec/models/form/lettings/questions/sheltered_spec.rb
+++ b/spec/models/form/lettings/questions/sheltered_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::Sheltered, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -40,7 +40,7 @@ RSpec.describe Form::Lettings::Questions::Sheltered, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
index d3022dfcf..1100796c8 100644
--- a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
+++ b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
context "with 2023/24 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer options" do
@@ -50,7 +50,7 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer options" do
diff --git a/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb b/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
index 4bab9187a..ba9a72001 100644
--- a/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthAffordableRent, type: :mo
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb b/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
index a3f9c80e2..55b51ccfa 100644
--- a/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthIntermediateRent, type: :
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/lettings/questions/tenancy_type_spec.rb b/spec/models/form/lettings/questions/tenancy_type_spec.rb
index 08818d3ea..82a5ae3e7 100644
--- a/spec/models/form/lettings/questions/tenancy_type_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_type_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -31,7 +31,7 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
context "with 2023/24 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer options" do
@@ -65,7 +65,7 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer options" do
diff --git a/spec/models/form/lettings/questions/waityear_spec.rb b/spec/models/form/lettings/questions/waityear_spec.rb
index 5f1f344b9..5d9a5b3a9 100644
--- a/spec/models/form/lettings/questions/waityear_spec.rb
+++ b/spec/models/form/lettings/questions/waityear_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -59,7 +59,7 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/lettings/questions/wheelchair_spec.rb b/spec/models/form/lettings/questions/wheelchair_spec.rb
index 984a2209f..0a9226ada 100644
--- a/spec/models/form/lettings/questions/wheelchair_spec.rb
+++ b/spec/models/form/lettings/questions/wheelchair_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::Wheelchair, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
diff --git a/spec/models/form/lettings/subsections/household_characteristics_spec.rb b/spec/models/form/lettings/subsections/household_characteristics_spec.rb
index e199f55d3..b97717077 100644
--- a/spec/models/form/lettings/subsections/household_characteristics_spec.rb
+++ b/spec/models/form/lettings/subsections/household_characteristics_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
context "with start year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -152,7 +152,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdCharacteristics, type: :mod
context "with start year >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/lettings/subsections/household_situation_spec.rb b/spec/models/form/lettings/subsections/household_situation_spec.rb
index dd6f20d89..b9f65dbdd 100644
--- a/spec/models/form/lettings/subsections/household_situation_spec.rb
+++ b/spec/models/form/lettings/subsections/household_situation_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdSituation, type: :model do
context "with form year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -48,7 +48,7 @@ RSpec.describe Form::Lettings::Subsections::HouseholdSituation, type: :model do
context "with form year >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/lettings/subsections/property_information_spec.rb b/spec/models/form/lettings/subsections/property_information_spec.rb
index d333ff669..cc12f621a 100644
--- a/spec/models/form/lettings/subsections/property_information_spec.rb
+++ b/spec/models/form/lettings/subsections/property_information_spec.rb
@@ -14,7 +14,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
let(:form) { instance_double(Form, start_date:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "when 2023" do
@@ -51,7 +51,7 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
let(:start_date) { Time.utc(2024, 2, 8) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/lettings/subsections/setup_spec.rb b/spec/models/form/lettings/subsections/setup_spec.rb
index 074f7ae5e..997f4d08e 100644
--- a/spec/models/form/lettings/subsections/setup_spec.rb
+++ b/spec/models/form/lettings/subsections/setup_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
context "with start year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -43,7 +43,7 @@ RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
context "with start year >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/lettings/subsections/tenancy_information_spec.rb b/spec/models/form/lettings/subsections/tenancy_information_spec.rb
index 0c69f89ab..fce8e57fb 100644
--- a/spec/models/form/lettings/subsections/tenancy_information_spec.rb
+++ b/spec/models/form/lettings/subsections/tenancy_information_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe Form::Lettings::Subsections::TenancyInformation, type: :model do
let(:form) { instance_double(Form, start_date:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "when 2023" do
@@ -33,7 +33,7 @@ RSpec.describe Form::Lettings::Subsections::TenancyInformation, type: :model do
let(:start_date) { Time.utc(2024, 2, 8) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb
index 68328a5db..a5cf4dd07 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_arab_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundArab, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb
index b4c8a198d..c0eb8a108 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_asian_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundAsian, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb
index 7650f49fa..0a04ff806 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_black_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundBlack, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb
index 42420774f..e7cae6445 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_mixed_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundMixed, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb
index 79dddc53a..ff45cd2c3 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_background_white_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicBackgroundWhite, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb b/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb
index dcc90fe51..9a94fc0fd 100644
--- a/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_ethnic_group_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicGroup, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb b/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb
index 2f3c92aa7..edc53bd79 100644
--- a/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_live_in_property_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1LiveInProperty, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer1_nationality_spec.rb b/spec/models/form/sales/pages/buyer1_nationality_spec.rb
index a9cb1e381..a84a44009 100644
--- a/spec/models/form/sales/pages/buyer1_nationality_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_nationality_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::Buyer1Nationality, type: :model do
before do
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct subsection" do
@@ -33,7 +33,7 @@ RSpec.describe Form::Sales::Pages::Buyer1Nationality, type: :model do
context "with year 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct questions" do
diff --git a/spec/models/form/sales/pages/buyer1_working_situation_spec.rb b/spec/models/form/sales/pages/buyer1_working_situation_spec.rb
index 2ae7f0f1e..fb8529967 100644
--- a/spec/models/form/sales/pages/buyer1_working_situation_spec.rb
+++ b/spec/models/form/sales/pages/buyer1_working_situation_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer1WorkingSituation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer2_nationality_spec.rb b/spec/models/form/sales/pages/buyer2_nationality_spec.rb
index 97b5f7caf..e01215d21 100644
--- a/spec/models/form/sales/pages/buyer2_nationality_spec.rb
+++ b/spec/models/form/sales/pages/buyer2_nationality_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::Buyer2Nationality, type: :model do
before do
allow(subsection).to receive(:form).and_return(form)
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct subsection" do
@@ -42,7 +42,7 @@ RSpec.describe Form::Sales::Pages::Buyer2Nationality, type: :model do
context "with year 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct questions" do
diff --git a/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb b/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb
index 96a67f5bf..6fbd835c5 100644
--- a/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/pages/buyer2_relationship_to_buyer1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::Buyer2RelationshipToBuyer1, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/buyer_interview_spec.rb b/spec/models/form/sales/pages/buyer_interview_spec.rb
index 24704526d..f7c6bbb70 100644
--- a/spec/models/form/sales/pages/buyer_interview_spec.rb
+++ b/spec/models/form/sales/pages/buyer_interview_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Pages::BuyerInterview, type: :model do
let(:page_id) { "buyer_interview" }
let(:page_definition) { nil }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
let(:subsection) { instance_double(Form::Subsection, form:, id: "setup") }
it "has correct subsection" do
@@ -45,7 +45,7 @@ RSpec.describe Form::Sales::Pages::BuyerInterview, type: :model do
end
context "when form is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
context "when there are joint buyers" do
subject(:page) { described_class.new(page_id, page_definition, subsection, joint_purchase: true) }
diff --git a/spec/models/form/sales/pages/buyer_live_spec.rb b/spec/models/form/sales/pages/buyer_live_spec.rb
index dd237214c..ac5ac2c27 100644
--- a/spec/models/form/sales/pages/buyer_live_spec.rb
+++ b/spec/models/form/sales/pages/buyer_live_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe Form::Sales::Pages::BuyerLive, type: :model do
let(:form) { instance_double(Form, start_date: current_collection_start_date) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/sales/pages/buyer_previous_spec.rb b/spec/models/form/sales/pages/buyer_previous_spec.rb
index d55243dec..8e1486ee6 100644
--- a/spec/models/form/sales/pages/buyer_previous_spec.rb
+++ b/spec/models/form/sales/pages/buyer_previous_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Sales::Pages::BuyerPrevious, type: :model do
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, depends_on: nil, enabled?: true, form:) }
let(:start_date_after_2024) { false }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_date_after_2024, depends_on_met: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_date_after_2024, depends_on_met: true) }
let(:joint_purchase) { false }
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/deposit_discount_spec.rb b/spec/models/form/sales/pages/deposit_discount_spec.rb
index d183e379b..f94c46707 100644
--- a/spec/models/form/sales/pages/deposit_discount_spec.rb
+++ b/spec/models/form/sales/pages/deposit_discount_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::DepositDiscount, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
@@ -45,7 +45,7 @@ RSpec.describe Form::Sales::Pages::DepositDiscount, type: :model do
context "when it's a 2024 form" do
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true, start_date: Time.zone.local(2024, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: true, start_date: Time.zone.local(2024, 4, 1)))
end
it "has correct depends_on" do
diff --git a/spec/models/form/sales/pages/deposit_spec.rb b/spec/models/form/sales/pages/deposit_spec.rb
index b33604176..ea309bffc 100644
--- a/spec/models/form/sales/pages/deposit_spec.rb
+++ b/spec/models/form/sales/pages/deposit_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::Deposit, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, enabled?: true, depends_on: true) }
- let(:form) { instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1), depends_on_met: true) }
+ let(:form) { instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1), depends_on_met: true) }
let(:optional) { false }
before do
@@ -31,7 +31,7 @@ RSpec.describe Form::Sales::Pages::Deposit, type: :model do
context "when routing with start year after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
context "and optional is false" do
@@ -131,7 +131,7 @@ RSpec.describe Form::Sales::Pages::Deposit, type: :model do
context "when routing with start year before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "and optional is false" do
diff --git a/spec/models/form/sales/pages/discount_spec.rb b/spec/models/form/sales/pages/discount_spec.rb
index 4585b7f19..c9fb16095 100644
--- a/spec/models/form/sales/pages/discount_spec.rb
+++ b/spec/models/form/sales/pages/discount_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::Discount, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/la_nominations_spec.rb b/spec/models/form/sales/pages/la_nominations_spec.rb
index b69f88f1f..036e26092 100644
--- a/spec/models/form/sales/pages/la_nominations_spec.rb
+++ b/spec/models/form/sales/pages/la_nominations_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::LaNominations, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:start_year_after_2024) { false }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_year_after_2024) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_year_after_2024) }
let(:subsection) { instance_double(Form::Subsection, form:) }
before do
diff --git a/spec/models/form/sales/pages/last_accommodation_la_spec.rb b/spec/models/form/sales/pages/last_accommodation_la_spec.rb
index b73cf07f0..9cdd64957 100644
--- a/spec/models/form/sales/pages/last_accommodation_la_spec.rb
+++ b/spec/models/form/sales/pages/last_accommodation_la_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::LastAccommodationLa, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:start_year_after_2024) { false }
- let(:form) { instance_double(Form, depends_on_met: true, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_year_after_2024) }
+ let(:form) { instance_double(Form, depends_on_met: true, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_year_after_2024) }
let(:subsection) { instance_double(Form::Subsection, form:, depends_on: nil, enabled?: true) }
let(:log) { build(:sales_log, :completed) }
diff --git a/spec/models/form/sales/pages/last_accommodation_spec.rb b/spec/models/form/sales/pages/last_accommodation_spec.rb
index 8c3dbdbbf..fbc581b4b 100644
--- a/spec/models/form/sales/pages/last_accommodation_spec.rb
+++ b/spec/models/form/sales/pages/last_accommodation_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::LastAccommodation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:start_year_after_2024) { false }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: start_year_after_2024) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: start_year_after_2024) }
let(:subsection) { instance_double(Form::Subsection, form:, depends_on: nil) }
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/managing_organisation_spec.rb b/spec/models/form/sales/pages/managing_organisation_spec.rb
index ea90add64..30383a1f5 100644
--- a/spec/models/form/sales/pages/managing_organisation_spec.rb
+++ b/spec/models/form/sales/pages/managing_organisation_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::ManagingOrganisation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, form:) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -103,7 +103,7 @@ RSpec.describe Form::Sales::Pages::ManagingOrganisation, type: :model do
describe "#routed_to? with 2024 logs" do
let(:log) { create(:sales_log) }
let(:organisation) { create(:organisation) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
context "when user nil" do
it "is not shown" do
diff --git a/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb b/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb
index 126f2f0b5..aeb196337 100644
--- a/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/pages/person_relationship_to_buyer1_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Sales::Pages::PersonRelationshipToBuyer1, type: :model do
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false)) }
let(:person_index) { 1 }
let(:page_id) { "person_1_relationship_to_buyer_1" }
diff --git a/spec/models/form/sales/pages/privacy_notice_spec.rb b/spec/models/form/sales/pages/privacy_notice_spec.rb
index 7510e60d9..80be7ae66 100644
--- a/spec/models/form/sales/pages/privacy_notice_spec.rb
+++ b/spec/models/form/sales/pages/privacy_notice_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
let(:page_id) { "privacy_notice" }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection, id: "setup") }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
before do
allow(subsection).to receive(:form).and_return(form)
@@ -40,7 +40,7 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(page.copy_key).to eq("sales.setup.privacynotice.joint_purchase")
@@ -64,7 +64,7 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(page.copy_key).to eq("sales.setup.privacynotice.not_joint_purchase")
diff --git a/spec/models/form/sales/pages/property_local_authority_spec.rb b/spec/models/form/sales/pages/property_local_authority_spec.rb
index faba75665..88d049bce 100644
--- a/spec/models/form/sales/pages/property_local_authority_spec.rb
+++ b/spec/models/form/sales/pages/property_local_authority_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Pages::PropertyLocalAuthority, type: :model do
context "with form before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "is routed to when la is not inferred" do
@@ -60,7 +60,7 @@ RSpec.describe Form::Sales::Pages::PropertyLocalAuthority, type: :model do
context "with form after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "is routed to when la is not inferred and address search has been given" do
diff --git a/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb b/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb
index 9d60c5f3c..01dcb7ce7 100644
--- a/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/sales/pages/property_wheelchair_accessible_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::PropertyWheelchairAccessible, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/purchase_price_spec.rb b/spec/models/form/sales/pages/purchase_price_spec.rb
index e5bfb176a..ad857ee9f 100644
--- a/spec/models/form/sales/pages/purchase_price_spec.rb
+++ b/spec/models/form/sales/pages/purchase_price_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Pages::PurchasePrice, type: :model do
let(:subsection) { instance_double(Form::Subsection) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/sales/pages/shared_ownership_type_spec.rb b/spec/models/form/sales/pages/shared_ownership_type_spec.rb
index d12c49b57..e6ae7d55d 100644
--- a/spec/models/form/sales/pages/shared_ownership_type_spec.rb
+++ b/spec/models/form/sales/pages/shared_ownership_type_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Sales::Pages::SharedOwnershipType, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: current_collection_start_date, start_year_after_2024?: true)) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: current_collection_start_date, start_year_2024_or_later?: true)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/sales/pages/uprn_spec.rb b/spec/models/form/sales/pages/uprn_spec.rb
index 17ef3179b..03e1197bc 100644
--- a/spec/models/form/sales/pages/uprn_spec.rb
+++ b/spec/models/form/sales/pages/uprn_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Form::Sales::Pages::Uprn, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(subsection).to receive(:form).and_return(form)
end
@@ -57,7 +57,7 @@ RSpec.describe Form::Sales::Pages::Uprn, type: :model do
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "points to address search page" do
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb
index 593a525d2..c5f243745 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_arab_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundArab, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb
index f49d64437..6cf9306b2 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_asian_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundAsian, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb
index 6afe4eaf5..cb040ffbd 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_black_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundBlack, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb
index d6e51de58..aced8cb58 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_mixed_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundMixed, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb
index d08ece820..6aa547e8b 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_background_white_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundWhite, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicBackgroundWhite, type: :model
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb b/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb
index 0bdc6d9c0..8a859100d 100644
--- a/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_ethnic_group_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1EthnicGroup, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb b/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb
index eccb172f7..038e0ce5d 100644
--- a/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_live_in_property_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1LiveInProperty, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer1_working_situation_spec.rb b/spec/models/form/sales/questions/buyer1_working_situation_spec.rb
index c99e64527..e25eb2aaf 100644
--- a/spec/models/form/sales/questions/buyer1_working_situation_spec.rb
+++ b/spec/models/form/sales/questions/buyer1_working_situation_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer1WorkingSituation, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb b/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb
index 8d81e8897..6cab95147 100644
--- a/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb
+++ b/spec/models/form/sales/questions/buyer2_ethnic_background_white_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::Buyer2EthnicBackgroundWhite, type: :model
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Questions::Buyer2EthnicBackgroundWhite, type: :model
context "with 2024/25 form" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb b/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb
index 1d478faa9..99185a592 100644
--- a/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/questions/buyer2_relationship_to_buyer1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::Buyer2RelationshipToBuyer1, type: :model
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/sales/questions/buyer_interview_spec.rb b/spec/models/form/sales/questions/buyer_interview_spec.rb
index e2b39c50f..0db43407f 100644
--- a/spec/models/form/sales/questions/buyer_interview_spec.rb
+++ b/spec/models/form/sales/questions/buyer_interview_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: true) }
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "setup")) }
it "has correct page" do
@@ -36,7 +36,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
context "when the form start year is before 2024" do
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "household_characteristics")) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 3, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 3, 1), start_year_2024_or_later?: false) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.household_characteristics.noint.joint_purchase")
@@ -44,7 +44,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.setup.noint.joint_purchase")
@@ -57,7 +57,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
context "when the form start year is before 2024" do
let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form:, id: "household_characteristics")) }
- let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.household_characteristics.noint.not_joint_purchase")
@@ -65,7 +65,7 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do
end
context "when the form start year is after 2024" do
- let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2024_or_later?: true) }
it "has the expected copy_key" do
expect(question.copy_key).to eq("sales.setup.noint.not_joint_purchase")
diff --git a/spec/models/form/sales/questions/buyer_live_spec.rb b/spec/models/form/sales/questions/buyer_live_spec.rb
index 12dfc8be6..4356db5dd 100644
--- a/spec/models/form/sales/questions/buyer_live_spec.rb
+++ b/spec/models/form/sales/questions/buyer_live_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Form::Sales::Questions::BuyerLive, type: :model do
let(:form) { instance_double(Form, start_date: current_collection_start_date) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
diff --git a/spec/models/form/sales/questions/buyer_previous_spec.rb b/spec/models/form/sales/questions/buyer_previous_spec.rb
index 8c37c2ff2..88204ad1a 100644
--- a/spec/models/form/sales/questions/buyer_previous_spec.rb
+++ b/spec/models/form/sales/questions/buyer_previous_spec.rb
@@ -48,7 +48,7 @@ RSpec.describe Form::Sales::Questions::BuyerPrevious, type: :model do
context "when form year is before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "is not marked as derived" do
@@ -58,7 +58,7 @@ RSpec.describe Form::Sales::Questions::BuyerPrevious, type: :model do
context "when form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "is marked as derived" do
diff --git a/spec/models/form/sales/questions/discount_spec.rb b/spec/models/form/sales/questions/discount_spec.rb
index 5037e2b4e..09c2fa076 100644
--- a/spec/models/form/sales/questions/discount_spec.rb
+++ b/spec/models/form/sales/questions/discount_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::Discount, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
@@ -47,7 +47,7 @@ RSpec.describe Form::Sales::Questions::Discount, type: :model do
context "with form start year after 2024" do
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true, start_date: Time.zone.local(2024, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: true, start_date: Time.zone.local(2024, 4, 1)))
end
it "has correct max" do
diff --git a/spec/models/form/sales/questions/mortgage_lender_spec.rb b/spec/models/form/sales/questions/mortgage_lender_spec.rb
index a7abd4c16..b4ce1bf86 100644
--- a/spec/models/form/sales/questions/mortgage_lender_spec.rb
+++ b/spec/models/form/sales/questions/mortgage_lender_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?)
+ allow(form).to receive(:start_year_2024_or_later?)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -46,7 +46,7 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
context "when form year is before 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -145,7 +145,7 @@ RSpec.describe Form::Sales::Questions::MortgageLender, type: :model do
context "when form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/mortgageused_spec.rb b/spec/models/form/sales/questions/mortgageused_spec.rb
index 7c37cbd78..e85238a4d 100644
--- a/spec/models/form/sales/questions/mortgageused_spec.rb
+++ b/spec/models/form/sales/questions/mortgageused_spec.rb
@@ -35,7 +35,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do
context "and the saledate is before 24/25" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return false
+ allow(form).to receive(:start_year_2024_or_later?).and_return false
end
it "does not show the don't know option" do
@@ -45,7 +45,7 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do
context "and the saledate is 24/25 or after" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return true
+ allow(form).to receive(:start_year_2024_or_later?).and_return true
end
it "shows the don't know option" do
diff --git a/spec/models/form/sales/questions/nationality_all_group_spec.rb b/spec/models/form/sales/questions/nationality_all_group_spec.rb
index a88bf1867..4c2b2a39e 100644
--- a/spec/models/form/sales/questions/nationality_all_group_spec.rb
+++ b/spec/models/form/sales/questions/nationality_all_group_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::NationalityAllGroup, type: :model do
let(:buyer_index) { 1 }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
it "has correct page" do
expect(question.page).to be page
diff --git a/spec/models/form/sales/questions/number_joint_buyers_spec.rb b/spec/models/form/sales/questions/number_joint_buyers_spec.rb
index 9529b3aac..bf53d7d88 100644
--- a/spec/models/form/sales/questions/number_joint_buyers_spec.rb
+++ b/spec/models/form/sales/questions/number_joint_buyers_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::NumberJointBuyers, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
diff --git a/spec/models/form/sales/questions/ownership_scheme_spec.rb b/spec/models/form/sales/questions/ownership_scheme_spec.rb
index 99ec32684..222ec180d 100644
--- a/spec/models/form/sales/questions/ownership_scheme_spec.rb
+++ b/spec/models/form/sales/questions/ownership_scheme_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::OwnershipScheme, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -41,7 +41,7 @@ RSpec.describe Form::Sales::Questions::OwnershipScheme, type: :model do
context "with collection year on or after 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has the correct answer_options" do
diff --git a/spec/models/form/sales/questions/person_age_spec.rb b/spec/models/form/sales/questions/person_age_spec.rb
index 5faa046bb..772ee20e0 100644
--- a/spec/models/form/sales/questions/person_age_spec.rb
+++ b/spec/models/form/sales/questions/person_age_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::PersonAge, type: :model do
let(:question_id) { "age3" }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb b/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb
index 32fb055cd..0bc00c179 100644
--- a/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb
+++ b/spec/models/form/sales/questions/person_relationship_to_buyer1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Sales::Questions::PersonRelationshipToBuyer1, type: :model
let(:question_id) { "relat2" }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false))) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_2024_or_later?: false))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/sales/questions/privacy_notice_spec.rb b/spec/models/form/sales/questions/privacy_notice_spec.rb
index 3f8c030b0..5f764c7af 100644
--- a/spec/models/form/sales/questions/privacy_notice_spec.rb
+++ b/spec/models/form/sales/questions/privacy_notice_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
- allow(form).to receive(:start_year_after_2024?)
+ allow(form).to receive(:start_year_2024_or_later?)
allow(page).to receive(:subsection).and_return(subsection)
allow(subsection).to receive(:form).and_return(form)
end
@@ -35,7 +35,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
let(:subsection) { instance_double(Form::Subsection, id: "household_characteristics") }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "and there is a single buyer" do
@@ -83,7 +83,7 @@ RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
context "when the form year is >= 2024" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
context "and there is a single buyer" do
diff --git a/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb b/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb
index 6b89deff2..a08a6d0f8 100644
--- a/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/sales/questions/property_wheelchair_accessible_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe Form::Sales::Questions::PropertyWheelchairAccessible, type: :mode
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
diff --git a/spec/models/form/sales/questions/shared_ownership_type_spec.rb b/spec/models/form/sales/questions/shared_ownership_type_spec.rb
index 91cf6da9e..aa75b381a 100644
--- a/spec/models/form/sales/questions/shared_ownership_type_spec.rb
+++ b/spec/models/form/sales/questions/shared_ownership_type_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
let(:page) { instance_double(Form::Page, subsection:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct page" do
@@ -36,7 +36,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
let(:start_date) { Time.zone.local(2023, 4, 2) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has the correct answer_options" do
@@ -59,7 +59,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
context "when form start date is on or after 2024/25" do
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "shows shows correct top_guidance_partial" do
diff --git a/spec/models/form/sales/subsections/household_characteristics_spec.rb b/spec/models/form/sales/subsections/household_characteristics_spec.rb
index 7c6546d79..3eb5042d8 100644
--- a/spec/models/form/sales/subsections/household_characteristics_spec.rb
+++ b/spec/models/form/sales/subsections/household_characteristics_spec.rb
@@ -19,7 +19,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
context "with 2022/23 form" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2022, 4, 1))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -120,7 +120,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
context "with 2023/24 form" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2023, 4, 1))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -228,7 +228,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
context "with 2024/25 form" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2024, 4, 1))
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/outright_sale_spec.rb b/spec/models/form/sales/subsections/outright_sale_spec.rb
index 0d28330f2..52941d0a9 100644
--- a/spec/models/form/sales/subsections/outright_sale_spec.rb
+++ b/spec/models/form/sales/subsections/outright_sale_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe Form::Sales::Subsections::OutrightSale, type: :model do
context "when 2022" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2022, 2, 8))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -51,7 +51,7 @@ RSpec.describe Form::Sales::Subsections::OutrightSale, type: :model do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2023, 2, 8))
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -80,7 +80,7 @@ RSpec.describe Form::Sales::Subsections::OutrightSale, type: :model do
context "when 2024" do
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2024, 2, 8))
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/property_information_spec.rb b/spec/models/form/sales/subsections/property_information_spec.rb
index 6e181f738..d29ee85fe 100644
--- a/spec/models/form/sales/subsections/property_information_spec.rb
+++ b/spec/models/form/sales/subsections/property_information_spec.rb
@@ -14,7 +14,7 @@ RSpec.describe Form::Sales::Subsections::PropertyInformation, type: :model do
let(:form) { instance_double(Form, start_date:) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(false)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(false)
end
context "when 2023" do
@@ -47,7 +47,7 @@ RSpec.describe Form::Sales::Subsections::PropertyInformation, type: :model do
let(:start_date) { Time.utc(2024, 2, 8) }
before do
- allow(form).to receive(:start_year_after_2024?).and_return(true)
+ allow(form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/setup_spec.rb b/spec/models/form/sales/subsections/setup_spec.rb
index 2d6612663..70d52977f 100644
--- a/spec/models/form/sales/subsections/setup_spec.rb
+++ b/spec/models/form/sales/subsections/setup_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
context "when start year is before 2024" do
before do
- allow(section.form).to receive(:start_year_after_2024?).and_return(false)
+ allow(section.form).to receive(:start_year_2024_or_later?).and_return(false)
end
it "has correct pages" do
@@ -48,7 +48,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
context "when start year is >= 2024" do
before do
- allow(section.form).to receive(:start_year_after_2024?).and_return(true)
+ allow(section.form).to receive(:start_year_2024_or_later?).and_return(true)
end
it "has correct pages" do
diff --git a/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb b/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb
index 922281fd0..8c5674d0b 100644
--- a/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb
+++ b/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Sales::Subsections::SharedOwnershipScheme, type: :model do
let(:section) { instance_double(Form::Sales::Sections::SaleInformation) }
before do
- allow(section).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
+ allow(section).to receive(:form).and_return(instance_double(Form, start_year_2024_or_later?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct section" do
diff --git a/spec/models/validations/property_validations_spec.rb b/spec/models/validations/property_validations_spec.rb
index 3f6f9877c..8cf484f91 100644
--- a/spec/models/validations/property_validations_spec.rb
+++ b/spec/models/validations/property_validations_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe Validations::PropertyValidations do
context "and the log is from before 24/25" do
it "adds an error" do
- allow(log.form).to receive(:start_year_after_2024?).and_return false
+ allow(log.form).to receive(:start_year_2024_or_later?).and_return false
property_validator.validate_shared_housing_rooms(log)
@@ -76,7 +76,7 @@ RSpec.describe Validations::PropertyValidations do
context "and the log is from before 24/25" do
it "adds an error" do
- allow(log.form).to receive(:start_year_after_2024?).and_return false
+ allow(log.form).to receive(:start_year_2024_or_later?).and_return false
property_validator.validate_shared_housing_rooms(log)