From c5e91c3b4317d274dae969a62bee297523e2b11b Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Tue, 2 May 2023 17:13:29 +0100 Subject: [PATCH] handle soctenant 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 3c1caf3b6..8e3baec8f 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -774,6 +774,8 @@ private attributes["staircasesale"] = field_90 + attributes["soctenant"] = field_99 + 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 82d18ab51..5139391ce 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -691,5 +691,13 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do expect(parser.log.staircasesale).to be(1) end end + + describe "#soctenant" do + let(:attributes) { setup_section_params.merge({ field_99: "1" }) } + + it "is correctly set" do + expect(parser.log.soctenant).to be(1) + end + end end end