Browse Source

infer renewal from rsnvac for bulk upload

remotes/origin/bulk-upload-errors-integration
Phil Lee 3 years ago
parent
commit
e0ac8b0642
  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

@ -572,6 +572,8 @@ private
1
when 2
0
when nil
field_116 == 14 ? 1 : 0
end
end

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

@ -370,6 +370,14 @@ RSpec.describe BulkUpload::Lettings::RowParser do
expect(parser.log.renewal).to eq(0)
end
end
context "when field_134 is null but rsnvac/field_116 is 14" do
let(:attributes) { { bulk_upload:, field_134: "", field_116: "14" } }
it "sets renewal to 1" do
expect(parser.log.renewal).to eq(1)
end
end
end
describe "#sexN fields" do

Loading…
Cancel
Save