Browse Source

Correct typo in location not found bulk upload error message (#1759)

* feat: update copy

* feat: update copy
pull/1753/head
natdeanlewissoftwire 1 year ago committed by GitHub
parent
commit
e759c3522a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/services/bulk_upload/lettings/year2022/row_parser.rb
  2. 2
      app/services/bulk_upload/lettings/year2023/row_parser.rb
  3. 2
      spec/services/bulk_upload/lettings/year2022/row_parser_spec.rb

2
app/services/bulk_upload/lettings/year2022/row_parser.rb

@ -548,7 +548,7 @@ private
def validate_location_exists def validate_location_exists
if scheme && field_5.present? && location.nil? if scheme && field_5.present? && location.nil?
errors.add(:field_5, "Location could be found with provided scheme code", category: :setup) errors.add(:field_5, "Location could not be found with the provided scheme code", category: :setup)
end end
end end

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

@ -745,7 +745,7 @@ private
def validate_location_exists def validate_location_exists
if scheme && field_17.present? && location.nil? if scheme && field_17.present? && location.nil?
errors.add(:field_17, "Location could be found with provided scheme code", category: :setup) errors.add(:field_17, "Location could not be found with the provided scheme code", category: :setup)
end end
end end

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

@ -556,7 +556,7 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do
end end
it "returns as setup error" do it "returns as setup error" do
expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to eql(["Location could be found with provided scheme code"]) expect(parser.errors.where(:field_5, category: :setup).map(&:message)).to eql(["Location could not be found with the provided scheme code"])
end end
end end
end end

Loading…
Cancel
Save