@ -517,7 +517,7 @@ private
def validate_declaration_acceptance
unless field_45 == 1
errors.add(:field_45, I18n.t("validations.declaration.missing"), category: :setup)
errors.add(:field_45, I18n.t("validations.declaration.missing.pre_2024"), category: :setup)
end
@ -692,6 +692,14 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
expect(parser).not_to be_valid
context "when the privacy notice is not accepted" do
let(:attributes) { valid_attributes.merge({ field_45: nil }) }
it "cannot be nulled" do
expect(parser.errors[:field_45]).to eq(["You must show the DLUHC privacy notice to the tenant before you can submit this log."])
describe "#validate_nulls" do
@ -787,6 +787,14 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
let(:attributes) { valid_attributes.merge({ field_15: nil }) }
expect(parser.errors[:field_15]).to eq(["You must answer tenant has seen the privacy notice"])