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