Browse Source

add #irproduct_other to bulk upload

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

@ -335,6 +335,8 @@ private
illness_type_8: %i[field_126], illness_type_8: %i[field_126],
illness_type_9: %i[field_127], illness_type_9: %i[field_127],
illness_type_10: %i[field_128], illness_type_10: %i[field_128],
irproduct_other: %i[field_131],
} }
end end
@ -524,6 +526,8 @@ private
attributes["illness_type_9"] = field_127 attributes["illness_type_9"] = field_127
attributes["illness_type_10"] = field_128 attributes["illness_type_10"] = field_128
attributes["irproduct_other"] = field_131
attributes attributes
end end

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

@ -517,5 +517,13 @@ RSpec.describe BulkUpload::Lettings::RowParser do
end end
end end
end end
describe "#irproduct_other" do
let(:attributes) { { bulk_upload:, field_131: "some other product" } }
it "sets value to given free text string" do
expect(parser.log.irproduct_other).to eql("some other product")
end
end
end end
end end

Loading…
Cancel
Save