Browse Source

add #tenancyother to bulk upload

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

@ -229,6 +229,7 @@ private
joint: %i[field_133],
startertenancy: %i[field_8],
tenancy: %i[field_9],
tenancyother: %i[field_10],
declaration: %i[field_132],
age1_known: %i[field_12],
@ -407,6 +408,7 @@ private
attributes["joint"] = field_133
attributes["startertenancy"] = field_8
attributes["tenancy"] = field_9
attributes["tenancyother"] = field_10
attributes["declaration"] = field_132
attributes["age1_known"] = field_12.present? ? 0 : 1

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

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

Loading…
Cancel
Save