Browse Source

add unitletas to bulk upload

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

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

@ -320,6 +320,8 @@ private
brent: %i[field_80], brent: %i[field_80],
hbrentshortfall: %i[field_87], hbrentshortfall: %i[field_87],
tshortfall: %i[field_88], tshortfall: %i[field_88],
unitletas: %i[field_105],
} }
end end
@ -494,6 +496,8 @@ private
attributes["hhmemb"] = hhmemb attributes["hhmemb"] = hhmemb
attributes["unitletas"] = field_105
attributes attributes
end end

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

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

Loading…
Cancel
Save