diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index 899f9522a..0d2dc2ccf 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -754,6 +754,7 @@ private attributes["ethnic_group2"] = infer_buyer2_ethnic_group_from_ethnic attributes["ethnicbuy2"] = field_40 + attributes["nationalbuy2"] = field_41 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 475a8703f..f1ec2a52b 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -643,5 +643,13 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do expect(parser.log.ethnicbuy2).to be(1) end end + + describe "#nationalbuy2" do + let(:attributes) { setup_section_params.merge({ field_41: "18" }) } + + it "is correctly set" do + expect(parser.log.nationalbuy2).to be(18) + end + end end end