|
|
|
@ -1390,6 +1390,19 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do
|
|
|
|
|
it "assigns the correct location" do |
|
|
|
|
expect(parser.log.location).to eql(location) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when location had leading zeroes in its id in Old CORE" do |
|
|
|
|
let(:attributes) { { bulk_upload:, field_4: scheme.old_visible_id, field_5: "123", field_111: owning_org.old_visible_id, field_113: owning_org.old_visible_id } } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
location.old_visible_id = "00123" |
|
|
|
|
location.save! |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "assigns the correct location" do |
|
|
|
|
expect(parser.log.location).to eql(location) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -1408,6 +1421,19 @@ RSpec.describe BulkUpload::Lettings::Year2022::RowParser do
|
|
|
|
|
it "assigns the correct scheme" do |
|
|
|
|
expect(parser.log.scheme).to eql(scheme) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when scheme had leading zeroes in its id in Old CORE" do |
|
|
|
|
let(:attributes) { { bulk_upload:, field_4: "10", field_5: location.old_visible_id, field_111: owning_org.old_visible_id, field_113: owning_org.old_visible_id } } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
scheme.old_visible_id = "010" |
|
|
|
|
scheme.save! |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "assigns the correct scheme" do |
|
|
|
|
expect(parser.log.scheme).to eql(scheme) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|