over_25:"The lead tenant must be under 26 as you told us their housing situation immediately before this letting was a children’s home or foster care"
child_over_19_relat:"Age must be 19 or under as you told us person 2's relationship to the %{person} is child"
student_not_child:
cannot_be_16_19:"Person cannot be aged 16-19 if they are a student but not a child"
ecstat:
retired_over_70:"Person %{person_num} must be retired if over 70"
child_under_16:"Person %{person_num}’s working situation must be ‘child under 16’, ‘other’ or ‘prefers not to say’ as you told us they’re under 16"
@ -486,6 +488,8 @@ en:
must_be_student_2024:"Person %{person_num}'s working situation must be student or prefers not to say, as their age is 16-19 and their relationship to the %{person} is child"
retired_male:"Answer cannot be ‘retired’ as the male tenant is under 65"
retired_female:"Answer cannot be ‘retired’ as the female tenant is under 60"
not_child_16_19:
cannot_be_student:"Person cannot be a student if they are aged 16-19 but are not a child"
relat:
child_under_16_sales:"Answer cannot be ‘partner’ as you told us person %{person_num}'s age is under 16"
child_under_16_lettings:"Answer cannot be ‘partner’ as you told us person %{person_num}'s age is under 16"
context"when the household contains a tenant’s child between the ages of 16 and 19"do
it"validates that person's economic status must be full time student or refused"do
record.age2=17
@ -567,9 +554,9 @@ RSpec.describe Validations::HouseholdValidations do
expect(record.errors["ecstat2"])
.toinclude("Person 2's working situation must be student or prefers not to say, as their age is 16-19 and their relationship to the lead tenant is child")
expect(record.errors["age2"])
.tobe_empty
.toinclude("Person cannot be aged 16-19 if they have relationship ‘child’ but are not a student")
expect(record.errors["relat2"])
.tobe_empty
.toinclude("Answer cannot be ‘child’ if the person is aged 16-19 but not a student")
end
it"expects that person can be a full time student"do
@ -609,11 +596,11 @@ RSpec.describe Validations::HouseholdValidations do