Browse Source

fix rebase issues

pull/1585/head
Phil Lee 3 years ago
parent
commit
e49aa315d9
  1. 4
      app/services/bulk_upload/lettings/year2023/row_parser.rb
  2. 2
      spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb

4
app/services/bulk_upload/lettings/year2023/row_parser.rb

@ -345,7 +345,7 @@ class BulkUpload::Lettings::Year2023::RowParser
validates :field_72, format: { with: /\A\d{1,3}\z|\AR\z/, message: "Age of person 7 must be a number or the letter R" }, allow_blank: true, on: :after_log validates :field_72, format: { with: /\A\d{1,3}\z|\AR\z/, message: "Age of person 7 must be a number or the letter R" }, allow_blank: true, on: :after_log
validates :field_76, format: { with: /\A\d{1,3}\z|\AR\z/, message: "Age of person 8 must be a number or the letter R" }, allow_blank: true, on: :after_log validates :field_76, format: { with: /\A\d{1,3}\z|\AR\z/, message: "Age of person 8 must be a number or the letter R" }, allow_blank: true, on: :after_log
validate :validate_needs_type_present validate :validate_needs_type_present, on: :after_log
validate :validate_data_types, on: :after_log validate :validate_data_types, on: :after_log
validate :validate_relevant_collection_window, on: :after_log validate :validate_relevant_collection_window, on: :after_log
validate :validate_la_with_local_housing_referral, on: :after_log validate :validate_la_with_local_housing_referral, on: :after_log
@ -537,7 +537,7 @@ private
def validate_needs_type_present def validate_needs_type_present
if field_4.blank? if field_4.blank?
errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type")) errors.add(:field_4, I18n.t("validations.not_answered", question: "needs type"), category: :setup)
end end
end end

2
spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb

@ -305,7 +305,7 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do
it "has errors on setup fields" do it "has errors on setup fields" do
errors = parser.errors.select { |e| e.options[:category] == :setup }.map(&:attribute).sort errors = parser.errors.select { |e| e.options[:category] == :setup }.map(&:attribute).sort
expect(errors).to eql(%i[field_1 field_111 field_113 field_96 field_97 field_98]) expect(errors).to eql(%i[field_1 field_111 field_113 field_132 field_96 field_97 field_98])
end end
end end

Loading…
Cancel
Save