From 0147705fcee82451f777e827aa4ee6759f214c20 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Thu, 21 Mar 2024 12:09:42 +0000 Subject: [PATCH] feat: update tests --- .../services/bulk_upload/lettings/year2023/row_parser_spec.rb | 2 +- .../services/bulk_upload/lettings/year2024/row_parser_spec.rb | 4 ++-- spec/services/bulk_upload/sales/year2024/row_parser_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb index aba3b0670..6203b9c59 100644 --- a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb @@ -698,7 +698,7 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do context "when non-setup questions are null" do let(:attributes) { setup_section_params.merge({ field_18: "", field_19: "", field_21: "" }) } - it "fetches the question's check_answer_label if it exists, otherwise it gets the question's header" do + it "fetches the question's check_answer_label if it exists" do parser.valid? expect(parser.errors[:field_19]).to eql(["You must answer address line 1"]) expect(parser.errors[:field_21]).to eql(["You must answer town or city"]) diff --git a/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb index eb2ad2f6f..a420f370b 100644 --- a/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb @@ -793,7 +793,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do context "when non-setup questions are null" do let(:attributes) { setup_section_params.merge({ field_43: "" }) } - it "fetches the question's check_answer_label if it exists, otherwise it gets the question's header" do + it "fetches the question's check_answer_label if it exists" do parser.valid? expect(parser.errors[:field_43]).to eql(["You must answer lead tenant’s gender identity"]) end @@ -1398,7 +1398,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do it "is not permitted as setup error" do setup_errors = parser.errors.select { |e| e.options[:category] == :setup } - expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("The managing organisation code is incorrect") + expect(setup_errors.find { |e| e.attribute == :field_2 }.message).to eql("You must answer managing organisation") end it "blocks log creation" do diff --git a/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb index db34d9c0c..68698e02a 100644 --- a/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2024/row_parser_spec.rb @@ -287,7 +287,7 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do context "when non-setup questions are null" do let(:attributes) { setup_section_params.merge({ field_32: "" }) } - it "fetches the question's check_answer_label if it exists, otherwise it gets the question's header" do + it "fetches the question's check_answer_label if it exists" do parser.valid? expect(parser.errors[:field_32]).to eql(["You must answer buyer 1’s gender identity"]) end