|
|
|
@ -1004,6 +1004,16 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when scheme ID has leading spaces" do |
|
|
|
|
let(:attributes) { { bulk_upload:, field_1: owning_org.old_visible_id, field_2: owning_org.old_visible_id, field_4: "2", field_5: "2", field_16: " S#{scheme.id}", field_17: location.id } } |
|
|
|
|
|
|
|
|
|
it "does not return an error" do |
|
|
|
|
expect(parser.errors[:field_15]).to be_blank |
|
|
|
|
expect(parser.errors[:field_16]).to be_blank |
|
|
|
|
expect(parser.errors[:field_17]).to be_blank |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when location exists but not related" do |
|
|
|
|
let(:other_scheme) { create(:scheme, :with_old_visible_id) } |
|
|
|
|
let(:other_location) { create(:location, :with_old_visible_id, scheme: other_scheme) } |
|
|
|
|