Browse Source

add #scharge to bulk upload

remotes/origin/bulk-upload-errors-integration
Phil Lee 3 years ago
parent
commit
7c70a38c02
  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],
brent: %i[field_80],
scharge: %i[field_81],
pscharge: %i[field_82],
supcharg: %i[field_83],
tcharge: %i[field_84],
@ -516,6 +517,7 @@ private
attributes["period"] = field_79
attributes["brent"] = field_80
attributes["scharge"] = field_81
attributes["pscharge"] = field_82
attributes["supcharg"] = field_83
attributes["tcharge"] = field_84

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

@ -613,5 +613,13 @@ RSpec.describe BulkUpload::Lettings::RowParser do
expect(parser.log.pscharge).to eq(123.45)
end
end
describe "#scharge" do
let(:attributes) { { bulk_upload:, field_81: "123.45" } }
it "sets value given" do
expect(parser.log.scharge).to eq(123.45)
end
end
end
end

Loading…
Cancel
Save