From 6d390d538bb10ae6e15550422b5bd6a136551baa Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Mon, 15 May 2023 14:17:29 +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 f944285fa..26ac2855b 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -625,6 +625,16 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do end end + describe "#field_15" do # more than 2 joint buyers? + context "when invalid option and must be answered" do + let(:attributes) { setup_section_params.merge({ field_14: "1", field_15: "100" }) } + + it "returns a setup error" do + expect(parser.errors.where(:field_15, 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" }) }