Browse Source

add propcode to bulk upload

pull/1148/head
Phil Lee 3 years ago
parent
commit
e25dc9ead2
  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

@ -348,6 +348,8 @@ private
irproduct_other: %i[field_131], irproduct_other: %i[field_131],
offered: %i[field_99], offered: %i[field_99],
propcode: %i[field_100],
} }
end end
@ -550,6 +552,8 @@ private
attributes["offered"] = field_99 attributes["offered"] = field_99
attributes["propcode"] = field_100
attributes attributes
end end

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

@ -629,5 +629,13 @@ RSpec.describe BulkUpload::Lettings::RowParser do
expect(parser.log.offered).to eq(3) expect(parser.log.offered).to eq(3)
end end
end end
describe "#propcode" do
let(:attributes) { { bulk_upload:, field_100: "abc123" } }
it "sets value given" do
expect(parser.log.propcode).to eq("abc123")
end
end
end end
end end

Loading…
Cancel
Save