Browse Source

Update BU tests

pull/2735/head
Kat 2 years ago
parent
commit
a1029186ad
  1. 1
      app/helpers/interruption_screen_helper.rb
  2. 4
      spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb
  3. 4
      spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb

1
app/helpers/interruption_screen_helper.rb

@ -1,6 +1,7 @@
module InterruptionScreenHelper
def display_informative_text(informative_text, log)
return informative_text if informative_text.is_a? String
return "" if informative_text.blank?
return "" unless informative_text["arguments"]
translation_params = {}

4
spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb

@ -1851,8 +1851,8 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
it "populates with correct error message" do
parser.valid?
expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
expect(parser.errors.where(:field_50, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
expect(parser.errors.where(:field_50, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
end
end

4
spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb

@ -1881,8 +1881,8 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
it "populates with correct error message" do
parser.valid?
expect(parser.errors.where(:field_42, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired.")
expect(parser.errors.where(:field_42, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
expect(parser.errors.where(:field_46, category: :soft_validation).first.message).to eql("You told us this person is aged 22 years and retired. The minimum expected retirement age in England is 66.")
end
end

Loading…
Cancel
Save