From 7ac52e10e926e279fbed276daaff17f84f6cdbdd Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Mon, 15 May 2023 14:07:11 +0100 Subject: [PATCH] add test coverage --- .../bulk_upload/sales/year2023/row_parser_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 d6ef57d91..f944285fa 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -615,6 +615,16 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do end end + describe "#field_14" do # joint purchase + context "when an invalid option" do + let(:attributes) { setup_section_params.merge({ field_14: "100" }) } + + it "returns a setup error" do + expect(parser.errors.where(:field_14, category: :setup)).to be_present + end + end + end + describe "#field_19" do # UPRN context "when UPRN known and lookup found" do let(:attributes) { setup_section_params.merge({ field_19: "100023336956" }) }