Browse Source

Fix tests

CLDC-4159-address-uprn-for-supported-housing
oscar-richardson-softwire 5 days ago
parent
commit
36050f4d91
  1. 25
      app/services/bulk_upload/lettings/year2026/row_parser.rb
  2. 169
      spec/services/bulk_upload/lettings/year2026/row_parser_spec.rb

25
app/services/bulk_upload/lettings/year2026/row_parser.rb

@ -438,8 +438,8 @@ class BulkUpload::Lettings::Year2026::RowParser
validate :validate_assigned_to_when_support, on: :after_log validate :validate_assigned_to_when_support, on: :after_log
validate :validate_all_charges_given, on: :after_log validate :validate_all_charges_given, on: :after_log
validate :validate_uprn_exists_if_any_key_address_fields_are_blank, on: :after_log, unless: -> { supported_housing? } validate :validate_uprn_exists_if_any_key_address_fields_are_blank, on: :after_log
validate :validate_address_fields, on: :after_log, unless: -> { supported_housing? } validate :validate_address_fields, on: :after_log
validate :validate_incomplete_soft_validations, on: :after_log validate :validate_incomplete_soft_validations, on: :after_log
validate :validate_nationality, on: :after_log validate :validate_nationality, on: :after_log
@ -536,9 +536,9 @@ class BulkUpload::Lettings::Year2026::RowParser
"field_9", # startdate "field_9", # startdate
"field_10", # startdate "field_10", # startdate
"field_13", # tenancycode "field_13", # tenancycode
!general_needs? ? :field_6.to_s : nil, # location !general_needs? ? :field_6.to_s : nil, # location # TODO: CLDC-4119: remove location from hash
!supported_housing? ? "field_23" : nil, # postcode !supported_housing? ? "field_23" : nil, # postcode # TODO: CLDC-4119: add postcode to hash for supported housing
!supported_housing? ? "field_24" : nil, # postcode !supported_housing? ? "field_24" : nil, # postcode # TODO: CLDC-4119: add postcode to hash for supported housing
"field_42", # age1 "field_42", # age1
"field_43", # sex1 "field_43", # sex1
"field_46", # ecstat1 "field_46", # ecstat1
@ -693,8 +693,8 @@ private
"ecstat1", "ecstat1",
"owning_organisation", "owning_organisation",
"tcharge", "tcharge",
!supported_housing? ? "postcode_full" : nil, !supported_housing? ? "postcode_full" : nil, # TODO: CLDC-4119: add postcode to duplicate check fields for supported housing
!general_needs? ? "location" : nil, !general_needs? ? "location" : nil, # TODO: CLDC-4119: remove location from duplicate check fields
"tenancycode", "tenancycode",
log.chcharge.present? ? "chcharge" : nil, log.chcharge.present? ? "chcharge" : nil,
].compact ].compact
@ -973,11 +973,11 @@ private
errors.add(:field_9, error_message) # startdate errors.add(:field_9, error_message) # startdate
errors.add(:field_10, error_message) # startdate errors.add(:field_10, error_message) # startdate
errors.add(:field_13, error_message) # tenancycode errors.add(:field_13, error_message) # tenancycode
errors.add(:field_6, error_message) if !general_needs? && :field_6.present? # location errors.add(:field_6, error_message) if !general_needs? && :field_6.present? # location # TODO: CLDC-4119: remove location from error fields
errors.add(:field_5, error_message) if !general_needs? && :field_6.blank? # add to Scheme field as unclear whether log uses New or Old CORE ids errors.add(:field_5, error_message) if !general_needs? && :field_6.blank? # add to Scheme field as unclear whether log uses New or Old CORE ids
errors.add(:field_23, error_message) unless supported_housing? # postcode_full errors.add(:field_23, error_message) unless supported_housing? # postcode_full # TODO: CLDC-4119: add postcode to error fields for supported housing
errors.add(:field_24, error_message) unless supported_housing? # postcode_full errors.add(:field_24, error_message) unless supported_housing? # postcode_full # TODO: CLDC-4119: add postcode to error fields for supported housing
errors.add(:field_25, error_message) unless supported_housing? # la errors.add(:field_25, error_message) unless supported_housing? # la # TODO: CLDC-4119: add LA to error fields for supported housing
errors.add(:field_42, error_message) # age1 errors.add(:field_42, error_message) # age1
errors.add(:field_43, error_message) # sex1 errors.add(:field_43, error_message) # sex1
errors.add(:field_46, error_message) # ecstat1 errors.add(:field_46, error_message) # ecstat1
@ -1335,7 +1335,6 @@ private
attributes["first_time_property_let_as_social_housing"] = first_time_property_let_as_social_housing attributes["first_time_property_let_as_social_housing"] = first_time_property_let_as_social_housing
if general_needs?
attributes["uprn_known"] = field_18.present? ? 1 : 0 attributes["uprn_known"] = field_18.present? ? 1 : 0
attributes["uprn_confirmed"] = 1 if field_18.present? attributes["uprn_confirmed"] = 1 if field_18.present?
attributes["skip_update_uprn_confirmed"] = true attributes["skip_update_uprn_confirmed"] = true
@ -1353,11 +1352,9 @@ private
attributes["postcode_known"] = postcode_known attributes["postcode_known"] = postcode_known
attributes["la"] = field_25 attributes["la"] = field_25
attributes["la_as_entered"] = field_25 attributes["la_as_entered"] = field_25
attributes["address_line1_input"] = address_line1_input attributes["address_line1_input"] = address_line1_input
attributes["postcode_full_input"] = postcode_full attributes["postcode_full_input"] = postcode_full
attributes["select_best_address_match"] = true if field_18.blank? attributes["select_best_address_match"] = true if field_18.blank?
end
attributes attributes
end end

169
spec/services/bulk_upload/lettings/year2026/row_parser_spec.rb

@ -12,7 +12,10 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
let(:owning_org) { create(:organisation, :with_old_visible_id) } let(:owning_org) { create(:organisation, :with_old_visible_id) }
let(:managing_org) { create(:organisation, :with_old_visible_id, rent_periods: [4, 1]) } let(:managing_org) { create(:organisation, :with_old_visible_id, rent_periods: [4, 1]) }
let(:scheme) { create(:scheme, :with_old_visible_id, owning_organisation: owning_org) } let(:scheme) { create(:scheme, :with_old_visible_id, owning_organisation: owning_org) }
let(:location) { create(:location, :with_old_visible_id, scheme:) } let(:postcode_first_part) { "AA1".freeze }
let(:postcode_second_part) { "1AA".freeze }
let(:postcode) { "#{postcode_first_part} #{postcode_second_part}" }
let(:location) { create(:location, :with_old_visible_id, scheme:, postcode:) }
let(:setup_section_params) do let(:setup_section_params) do
{ {
@ -88,7 +91,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
.to_return(status: 200, body: "{\"status\":200,\"result\":{\"admin_district\":\"Manchester\", \"codes\":{\"admin_district\": \"E08000003\"}}}", headers: {}) .to_return(status: 200, body: "{\"status\":200,\"result\":{\"admin_district\":\"Manchester\", \"codes\":{\"admin_district\": \"E08000003\"}}}", headers: {})
stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/) stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/)
.to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.9, BUILDING_NAME: "result address line 1", POST_TOWN: "result town or city", POSTCODE: "AA1 1AA", UPRN: "12345" } }] }.to_json, headers: {}) .to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.9, BUILDING_NAME: "result address line 1", POST_TOWN: "result town or city", POSTCODE: postcode, UPRN: "12345" } }] }.to_json, headers: {})
stub_request(:get, /api\.os\.uk\/search\/places\/v1\/uprn/) stub_request(:get, /api\.os\.uk\/search\/places\/v1\/uprn/)
.to_return(status: 200, body: '{"status":200,"results":[{"DPA":{ .to_return(status: 200, body: '{"status":200,"results":[{"DPA":{
@ -101,7 +104,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
"DEPENDENT_THOROUGHFARE_NAME": "data", "DEPENDENT_THOROUGHFARE_NAME": "data",
"THOROUGHFARE_NAME": "thing", "THOROUGHFARE_NAME": "thing",
"POST_TOWN": "London", "POST_TOWN": "London",
"POSTCODE": "SE2 6RT" "POSTCODE": "' + postcode + '"
}}]}', headers: {}) }}]}', headers: {})
end end
@ -1484,10 +1487,22 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
describe "UPRN and address fields" do describe "UPRN and address fields" do
context "with a general needs log" do %i[
general_needs
supported_housing
].each do |needs_type|
context "with a #{needs_type.to_s.tr('_', ' ')} log" do
let(:base_attributes) do
setup_section_params.merge({
field_4: needs_type == :supported_housing ? 2 : 1,
field_5: needs_type == :supported_housing ? "S#{scheme.id}" : nil,
field_6: needs_type == :supported_housing ? location.old_visible_id : nil,
}.compact)
end
context "when a valid UPRN is given" do context "when a valid UPRN is given" do
context "and address fields are not given" do context "and address fields are not given" do
let(:attributes) { setup_section_params.merge({ field_4: 1, field_18: "123456789012" }) } let(:attributes) { base_attributes.merge({ field_18: "123456789012" }) }
it "does not add errors" do it "does not add errors" do
parser.valid? parser.valid?
@ -1495,12 +1510,37 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
expect(parser.errors[field]).to be_empty expect(parser.errors[field]).to be_empty
end end
end end
if needs_type == :supported_housing
context "and the postcode associated with the UPRN does not match the postcode associated with the location" do
before do
stub_request(:get, /api\.os\.uk\/search\/places\/v1\/uprn/)
.to_return(status: 200, body: '{"status":200,"results":[{"DPA":{
"PO_BOX_NUMBER": "fake",
"ORGANISATION_NAME": "org",
"DEPARTMENT_NAME": "name",
"SUB_BUILDING_NAME": "building",
"BUILDING_NAME": "name",
"BUILDING_NUMBER": "number",
"DEPENDENT_THOROUGHFARE_NAME": "data",
"THOROUGHFARE_NAME": "thing",
"POST_TOWN": "London",
"POSTCODE": "BB2 2BB"
}}]}', headers: {})
end
it "adds an appropriate error to the UPRN field" do
parser.valid?
expect(parser.errors[:field_18]).to eql([I18n.t("validations.lettings.property.uprn.postcode_does_not_match_scheme_location_postcode")])
end
end
end
end end
end end
context "when an invalid UPRN is given" do context "when an invalid UPRN is given" do
context "and address fields are not given" do context "and address fields are not given" do
let(:attributes) { setup_section_params.merge({ field_4: 1, field_18: "1234567890123" }) } let(:attributes) { base_attributes.merge({ field_18: "1234567890123" }) }
it "adds an appropriate error to the UPRN field" do it "adds an appropriate error to the UPRN field" do
parser.valid? parser.valid?
@ -1517,7 +1557,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
context "and address fields are given" do context "and address fields are given" do
let(:attributes) { setup_section_params.merge({ field_4: 1, field_18: "1234567890123", field_19: "address line 1", field_21: "town or city", field_23: "AA1", field_24: "1AA" }) } let(:attributes) { base_attributes.merge({ field_18: "1234567890123", field_19: "address line 1", field_21: "town or city", field_23: postcode_first_part, field_24: postcode_second_part }) }
it "adds an error to the UPRN field only" do it "adds an error to the UPRN field only" do
parser.valid? parser.valid?
@ -1536,7 +1576,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
context "when no UPRN is given" do context "when no UPRN is given" do
context "and no address fields are given" do context "and no address fields are given" do
let(:attributes) { setup_section_params.merge({ field_4: 1 }) } let(:attributes) { base_attributes.merge({ field_4: 1 }) }
it "adds appropriate errors to UPRN and key address fields" do it "adds appropriate errors to UPRN and key address fields" do
parser.valid? parser.valid?
@ -1549,7 +1589,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
context "and some key address field is missing" do context "and some key address field is missing" do
let(:attributes) { setup_section_params.merge({ field_4: 1, field_21: "town or city", field_23: "AA1", field_24: "1AA" }) } let(:attributes) { base_attributes.merge({ field_21: "town or city", field_23: postcode_first_part, field_24: postcode_second_part }) }
it "adds errors to UPRN and the missing key address field" do it "adds errors to UPRN and the missing key address field" do
parser.valid? parser.valid?
@ -1562,12 +1602,12 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
context "and all key address fields are present" do context "and all key address fields are present" do
let(:attributes) { setup_section_params.merge({ field_4: 1, field_18: nil, field_19: "address line 1", field_21: "town or city", field_23: "AA1", field_24: "1AA" }) } let(:attributes) { base_attributes.merge({ field_18: nil, field_19: "address line 1", field_21: "town or city", field_23: postcode_first_part, field_24: postcode_second_part }) }
context "and an address can be found with a high enough match rating" do context "and an address can be found with a high enough match rating" do
before do before do
stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/) stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/)
.to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.7, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: "AA1 1AA", UPRN: "1" } }] }.to_json, headers: {}) .to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.7, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: postcode, UPRN: "1" } }] }.to_json, headers: {})
end end
it "does not add errors" do it "does not add errors" do
@ -1601,14 +1641,27 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
expect(parser.log.manual_address_entry_selected).to be_truthy expect(parser.log.manual_address_entry_selected).to be_truthy
expect(parser.log.address_line1).to eq("address line 1") expect(parser.log.address_line1).to eq("address line 1")
expect(parser.log.town_or_city).to eq("town or city") expect(parser.log.town_or_city).to eq("town or city")
expect(parser.log.postcode_full).to eq("AA1 1AA") expect(parser.log.postcode_full).to eq(postcode)
end
if needs_type == :supported_housing
context "and the postcode entered manually does not match the postcode associated with the location" do
let(:attributes) { base_attributes.merge({ field_18: nil, field_19: "address line 1", field_21: "town or city", field_23: "BB2", field_24: "2BB" }) }
it "adds appropriate errors to postcode and LA fields" do
parser.valid?
expect(parser.errors[:field_23]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
expect(parser.errors[:field_24]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
expect(parser.errors[:field_25]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
end
end
end end
end end
context "when a single address with not a high enough match rating is returned" do context "when a single address with not a high enough match rating is returned" do
before do before do
stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/) stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/)
.to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.6, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: "AA1 1AA", UPRN: "1" } }] }.to_json, headers: {}) .to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.6, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: postcode, UPRN: "1" } }] }.to_json, headers: {})
end end
it "does not add errors" do it "does not add errors" do
@ -1623,14 +1676,27 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
expect(parser.log.manual_address_entry_selected).to be_truthy expect(parser.log.manual_address_entry_selected).to be_truthy
expect(parser.log.address_line1).to eq("address line 1") expect(parser.log.address_line1).to eq("address line 1")
expect(parser.log.town_or_city).to eq("town or city") expect(parser.log.town_or_city).to eq("town or city")
expect(parser.log.postcode_full).to eq("AA1 1AA") expect(parser.log.postcode_full).to eq(postcode)
end
if needs_type == :supported_housing
context "and the postcode entered manually does not match the postcode associated with the location" do
let(:attributes) { base_attributes.merge({ field_18: nil, field_19: "address line 1", field_21: "town or city", field_23: "BB2", field_24: "2BB" }) }
it "adds appropriate errors to postcode and LA fields" do
parser.valid?
expect(parser.errors[:field_23]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
expect(parser.errors[:field_24]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
expect(parser.errors[:field_25]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
end
end
end end
end end
context "when no addresses have a high enough match rating" do context "when no addresses have a high enough match rating" do
before do before do
stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/) stub_request(:get, /api\.os\.uk\/search\/places\/v1\/find/)
.to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.6, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: "AA1 1AA", UPRN: "1" } }, { DPA: { MATCH: 0.8, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: "BB2 2BB", UPRN: "2" } }] }.to_json, headers: {}) .to_return(status: 200, body: { results: [{ DPA: { MATCH: 0.6, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: postcode, UPRN: "1" } }, { DPA: { MATCH: 0.8, BUILDING_NAME: "", POST_TOWN: "", POSTCODE: "BB2 2BB", UPRN: "2" } }] }.to_json, headers: {})
end end
it "does not add errors" do it "does not add errors" do
@ -1646,21 +1712,22 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
expect(parser.log.manual_address_entry_selected).to be_truthy expect(parser.log.manual_address_entry_selected).to be_truthy
expect(parser.log.address_line1).to eq("address line 1") expect(parser.log.address_line1).to eq("address line 1")
expect(parser.log.town_or_city).to eq("town or city") expect(parser.log.town_or_city).to eq("town or city")
expect(parser.log.postcode_full).to eq("AA1 1AA") expect(parser.log.postcode_full).to eq(postcode)
end end
if needs_type == :supported_housing
context "and the postcode entered manually does not match the postcode associated with the location" do
let(:attributes) { base_attributes.merge({ field_18: nil, field_19: "address line 1", field_21: "town or city", field_23: "BB2", field_24: "2BB" }) }
it "adds appropriate errors to postcode and LA fields" do
parser.valid?
expect(parser.errors[:field_23]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
expect(parser.errors[:field_24]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
expect(parser.errors[:field_25]).to eql([I18n.t("validations.lettings.property.postcode_full.does_not_match_scheme_location_postcode")])
end end
end end
end end
end end
context "with a supported housing log" do
context "when neither UPRN nor address fields are provided" do
let(:attributes) { setup_section_params.merge({ field_4: 2, field_5: "S#{scheme.id}", field_6: location.old_visible_id, field_18: nil, field_19: nil, field_21: nil, field_23: nil, field_24: nil }) }
it "does not add missing field errors" do
parser.valid?
%i[field_18 field_19 field_20 field_21 field_22 field_23 field_24].each do |field|
expect(parser.errors[field]).to be_empty
end end
end end
end end
@ -1869,8 +1936,23 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
end end
describe "address-related fields" do
%i[
general_needs
supported_housing
].each do |needs_type|
context "with a #{needs_type.to_s.tr('_', ' ')} log" do
let(:base_attributes) do
{
bulk_upload:,
field_4: needs_type == :supported_housing ? 2 : 1,
field_5: needs_type == :supported_housing ? "S#{scheme.id}" : nil,
field_6: needs_type == :supported_housing ? location.old_visible_id : nil,
}.compact
end
describe "#uprn" do describe "#uprn" do
let(:attributes) { { bulk_upload:, field_4: 1, field_18: "12" } } let(:attributes) { base_attributes.merge({ field_18: "12" }) }
it "sets to given value" do it "sets to given value" do
expect(parser.log.uprn).to eql("12") expect(parser.log.uprn).to eql("12")
@ -1879,7 +1961,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
describe "#uprn_known" do describe "#uprn_known" do
context "when uprn specified" do context "when uprn specified" do
let(:attributes) { { bulk_upload:, field_4: 1, field_18: "12" } } let(:attributes) { base_attributes.merge({ field_18: "12" }) }
it "sets to 1" do it "sets to 1" do
expect(parser.log.uprn_known).to be(1) expect(parser.log.uprn_known).to be(1)
@ -1888,7 +1970,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
context "when uprn blank" do context "when uprn blank" do
let(:attributes) { { bulk_upload:, field_4: 1, field_18: "" } } let(:attributes) { base_attributes.merge({ field_18: "" }) }
it "sets to 0" do it "sets to 0" do
expect(parser.log.uprn_known).to be(0) expect(parser.log.uprn_known).to be(0)
@ -1897,7 +1979,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
describe "#address_line1" do describe "#address_line1" do
let(:attributes) { { bulk_upload:, field_4: 1, field_19: "123 Sesame Street" } } let(:attributes) { base_attributes.merge({ field_19: "123 Sesame Street" }) }
it "sets to given value" do it "sets to given value" do
expect(parser.log.address_line1).to eql("123 Sesame Street") expect(parser.log.address_line1).to eql("123 Sesame Street")
@ -1905,7 +1987,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
describe "#address_line2" do describe "#address_line2" do
let(:attributes) { { bulk_upload:, field_4: 1, field_20: "Cookie Town" } } let(:attributes) { base_attributes.merge({ field_20: "Cookie Town" }) }
it "sets to given value" do it "sets to given value" do
expect(parser.log.address_line2).to eql("Cookie Town") expect(parser.log.address_line2).to eql("Cookie Town")
@ -1913,7 +1995,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
describe "#town_or_city" do describe "#town_or_city" do
let(:attributes) { { bulk_upload:, field_4: 1, field_21: "London" } } let(:attributes) { base_attributes.merge({ field_21: "London" }) }
it "sets to given value" do it "sets to given value" do
expect(parser.log.town_or_city).to eql("London") expect(parser.log.town_or_city).to eql("London")
@ -1921,35 +2003,12 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
end end
describe "#county" do describe "#county" do
let(:attributes) { { bulk_upload:, field_4: 1, field_22: "Greater London" } } let(:attributes) { base_attributes.merge({ field_22: "Greater London" }) }
it "sets to given value" do it "sets to given value" do
expect(parser.log.county).to eql("Greater London") expect(parser.log.county).to eql("Greater London")
end end
end end
describe "address related fields for supported housing logs" do
context "when address data is provided for a supported housing log" do
let(:attributes) { { bulk_upload:, field_4: 2, field_18: nil, field_19: "Flat 1", field_20: "Example Place", field_21: "London", field_22: "Greater London", field_23: "SW1A", field_24: "1AA" } }
it "is not set on the log" do
expect(parser.log.uprn).to be_nil
expect(parser.log.uprn_known).to be_nil
expect(parser.log.address_line1).to be_nil
expect(parser.log.address_line1_as_entered).to be_nil
expect(parser.log.address_line2).to be_nil
expect(parser.log.address_line2_as_entered).to be_nil
expect(parser.log.town_or_city).to be_nil
expect(parser.log.town_or_city_as_entered).to be_nil
expect(parser.log.county).to be_nil
expect(parser.log.county_as_entered).to be_nil
expect(parser.log.postcode_full).to be_nil
expect(parser.log.postcode_full_as_entered).to be_nil
expect(parser.log.la).to be_nil
expect(parser.log.la_as_entered).to be_nil
expect(parser.log.address_line1_input).to be_nil
expect(parser.log.postcode_full_input).to be_nil
expect(parser.log.select_best_address_match).to be_nil
end end
end end
end end

Loading…
Cancel
Save