From 1ad0f6d2b76d42fa20d093b5c14ffd96c3f7535d Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Tue, 16 May 2023 10:44:17 +0100 Subject: [PATCH] add test coverage --- .../bulk_upload/sales/year2022/row_parser_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/services/bulk_upload/sales/year2022/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2022/row_parser_spec.rb index 51a5ae6ad..4420e33ff 100644 --- a/spec/services/bulk_upload/sales/year2022/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2022/row_parser_spec.rb @@ -304,6 +304,16 @@ RSpec.describe BulkUpload::Sales::Year2022::RowParser do end end + describe "#field_57" do # type of shared ownership scheme + context "when an invalid option" do + let(:attributes) { setup_section_params.merge({ field_57: "100" }) } + + it "returns setup error" do + expect(parser.errors.where(:field_57, category: :setup).map(&:message)).to eql(["Enter a valid value for what is the type of shared ownership sale?"]) + end + end + end + describe "#field_92" do # owning org context "when no data given" do let(:attributes) { { bulk_upload:, field_92: "" } }