Browse Source

add #chcharge to bulk upload

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

@ -321,6 +321,7 @@ private
period: %i[field_79], period: %i[field_79],
brent: %i[field_80], brent: %i[field_80],
chcharge: %i[field_85],
household_charge: %i[field_86], household_charge: %i[field_86],
hbrentshortfall: %i[field_87], hbrentshortfall: %i[field_87],
tshortfall: %i[field_88], tshortfall: %i[field_88],
@ -512,6 +513,7 @@ private
attributes["period"] = field_79 attributes["period"] = field_79
attributes["brent"] = field_80 attributes["brent"] = field_80
attributes["chcharge"] = field_85
attributes["household_charge"] = field_86 attributes["household_charge"] = field_86
attributes["hbrentshortfall"] = field_87 attributes["hbrentshortfall"] = field_87
attributes["tshortfall_known"] = tshortfall_known attributes["tshortfall_known"] = tshortfall_known

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

@ -581,5 +581,13 @@ RSpec.describe BulkUpload::Lettings::RowParser do
expect(parser.log.household_charge).to eq(1) expect(parser.log.household_charge).to eq(1)
end end
end end
describe "#chcharge" do
let(:attributes) { { bulk_upload:, field_85: "123.45" } }
it "sets value given" do
expect(parser.log.chcharge).to eq(123.45)
end
end
end end
end end

Loading…
Cancel
Save