Browse Source

fix incorrect logic for bulk upload renewal

pull/1197/head
Phil Lee 3 years ago
parent
commit
42a6512845
  1. 2
      app/services/bulk_upload/lettings/row_parser.rb
  2. 4
      spec/services/bulk_upload/lettings/row_parser_spec.rb

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

@ -663,7 +663,7 @@ private
when 2
0
when nil
field_116 == 14 ? 1 : 0
rsnvac == 14 ? 1 : 0
end
end

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

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

Loading…
Cancel
Save