Browse Source

add #sheltered to bulk upload

remotes/origin/bulk-upload-errors-integration
Phil Lee 3 years ago
parent
commit
3e29cd78a4
  1. 2
      app/services/bulk_upload/lettings/row_parser.rb
  2. 8
      spec/services/bulk_upload/lettings/row_parser_spec.rb

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

@ -323,6 +323,7 @@ private
unitletas: %i[field_105],
rsnvac: %i[field_106],
sheltered: %i[field_117],
}
end
@ -499,6 +500,7 @@ private
attributes["unitletas"] = field_105
attributes["rsnvac"] = field_106
attributes["sheltered"] = field_117
attributes
end

8
spec/services/bulk_upload/lettings/row_parser_spec.rb

@ -474,5 +474,13 @@ RSpec.describe BulkUpload::Lettings::RowParser do
expect(parser.log.rsnvac).to eq(5)
end
end
describe "#sheltered" do
let(:attributes) { { bulk_upload:, field_117: "1" } }
it "sets value from correct mapping" do
expect(parser.log.sheltered).to eq(1)
end
end
end
end

Loading…
Cancel
Save