From 5d7fdcd0ede67e4c300bf665eb9411a4638dcbb9 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Tue, 2 May 2023 17:06:45 +0100 Subject: [PATCH] handle prevshared for 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 060e468ea..c52e73ea8 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -770,6 +770,8 @@ private attributes["hhregresstill"] = field_74 + attributes["prevshared"] = field_85 + 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 a11aa2f3c..5369798cb 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -675,5 +675,13 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do expect(parser.log.hhregresstill).to be(4) end end + + describe "#prevshared" do + let(:attributes) { setup_section_params.merge({ field_85: "3" }) } + + it "is correctly set" do + expect(parser.log.prevshared).to be(3) + end + end end end