@ -270,6 +270,10 @@ RSpec.describe Validations::FinancialValidations do
expect(record.errors["age2"]).tobe_empty
expect(record.errors["age3"])
.toeq(["The household's income of £5,000.00 weekly is too high for the number of adults. Change either the household income or the age of the tenants."])
(record.hhmemb+1..8).eachdo|n|
expect(record.errors["ecstat#{n}"]).tobe_empty
expect(record.errors["age#{n}"]).tobe_empty
end
end
it"adds errors to relevant fields for each tenant when income is too low"do
@ -285,6 +289,9 @@ RSpec.describe Validations::FinancialValidations do
expect(record.errors["ecstat#{n}"])
.toeq(["The household's income of £50.00 weekly is too low given the household’s working situation"])