From f163da863e2c5fbe991480524435141aa91f653f Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Tue, 2 May 2023 16:53:56 +0100 Subject: [PATCH] handle hhregresstill sales bulk upload 2023 --- app/services/bulk_upload/sales/year2023/row_parser.rb | 2 ++ .../bulk_upload/sales/year2023/row_parser_spec.rb | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index efe100680..060e468ea 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -768,6 +768,8 @@ private attributes["buy2living"] = field_71 attributes["prevtenbuy2"] = prevtenbuy2 + attributes["hhregresstill"] = field_74 + attributes end diff --git a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb index d1fc40e48..a11aa2f3c 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -667,5 +667,13 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do expect(parser.log.prevtenbuy2).to be(0) end end + + describe "#hhregresstill" do + let(:attributes) { setup_section_params.merge({ field_74: "4" }) } + + it "is correctly set" do + expect(parser.log.hhregresstill).to be(4) + end + end end end