Browse Source

CLDC-4168: Allow for "r" in mortlen

pull/3195/head
samyou-softwire 2 weeks ago
parent
commit
e4e52b1112
  1. 3
      app/services/bulk_upload/sales/year2026/row_parser.rb
  2. 2
      spec/services/bulk_upload/sales/year2026/row_parser_spec.rb

3
app/services/bulk_upload/sales/year2026/row_parser.rb

@ -167,6 +167,9 @@ class BulkUpload::Sales::Year2026::RowParser
:field_75, # What is the total amount the buyers had in savings before they paid any deposit for the property? :field_75, # What is the total amount the buyers had in savings before they paid any deposit for the property?
:field_70, # What is buyer 1’s gross annual income? :field_70, # What is buyer 1’s gross annual income?
:field_72, # What is buyer 2’s gross annual income? :field_72, # What is buyer 2’s gross annual income?
:field_90, # What is the length of the mortgage in years? - Shared ownership
:field_118, # What is the length of the mortgage in years? - Discounted ownership
].freeze ].freeze
attribute :bulk_upload attribute :bulk_upload

2
spec/services/bulk_upload/sales/year2026/row_parser_spec.rb

@ -302,7 +302,7 @@ RSpec.describe BulkUpload::Sales::Year2026::RowParser do
context "and case insensitive fields are set to lowercase" do context "and case insensitive fields are set to lowercase" do
let(:case_insensitive_fields) { %w[field_122 field_123 field_124 field_125 field_126 field_127] } let(:case_insensitive_fields) { %w[field_122 field_123 field_124 field_125 field_126 field_127] }
let(:case_insensitive_integer_fields_with_r_option) { %w[field_28 field_35 field_43 field_47 field_51 field_55 field_64 field_75 field_70 field_72] } let(:case_insensitive_integer_fields_with_r_option) { %w[field_28 field_35 field_43 field_47 field_51 field_55 field_64 field_75 field_70 field_72 field_90 field_118] }
let(:attributes) do let(:attributes) do
valid_attributes valid_attributes
.merge(case_insensitive_fields.each_with_object({}) { |field, h| h[field.to_sym] = valid_attributes[field.to_sym]&.downcase }) .merge(case_insensitive_fields.each_with_object({}) { |field, h| h[field.to_sym] = valid_attributes[field.to_sym]&.downcase })

Loading…
Cancel
Save