Browse Source

Add test for :skip_bu_error

pull/2538/head
Rachael Booth 2 years ago
parent
commit
2383bc99c3
  1. 12
      spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb

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

@ -750,6 +750,18 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
expect(parser.errors[:field_15]).to eq(["You must answer tenant has seen the privacy notice"])
end
end
context "when there is a :skip_bu_error error" do
let(:managing_org) { create(:organisation, :with_old_visible_id, rent_periods: [4, 1]) }
let(:attributes) { valid_attributes.merge({ field_123: 3, field_128: 80 }) }
it "does not add that error" do
parser.valid?
expect(parser.log.errors.map(&:attribute).sort).to eql(%i[managing_organisation period])
expect(parser.errors.map(&:attribute)).to eql(%i[field_123])
end
end
end
describe "#validate_nulls" do

Loading…
Cancel
Save