|
|
|
@ -1767,6 +1767,36 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when it is a new build" do |
|
|
|
|
let(:attributes) { setup_section_params.merge({ |
|
|
|
|
field_24: "15", |
|
|
|
|
field_17: "Address line 1", |
|
|
|
|
field_18: "Address line 2", |
|
|
|
|
field_19: "Town or city", |
|
|
|
|
field_20: "County", |
|
|
|
|
field_21: "DS1", |
|
|
|
|
field_22: "1AA", |
|
|
|
|
field_23: "E09000008", |
|
|
|
|
}) } |
|
|
|
|
|
|
|
|
|
it "sets manual address entry fields" do |
|
|
|
|
stub_request(:get, /api\.postcodes\.io/) |
|
|
|
|
.to_return(status: 200, body: "{\"status\":200,\"result\":{}", headers: {}) |
|
|
|
|
|
|
|
|
|
parser.valid? |
|
|
|
|
expect(parser.log.select_best_address_match).to be_nil |
|
|
|
|
expect(parser.log.uprn_selection).to eq("uprn_not_listed") |
|
|
|
|
expect(parser.log.uprn_known).to be(0) |
|
|
|
|
expect(parser.log.uprn_confirmed).to be_nil |
|
|
|
|
expect(parser.log.address_line1).to eq("Address line 1") |
|
|
|
|
expect(parser.log.address_line2).to eq("Address line 2") |
|
|
|
|
expect(parser.log.town_or_city).to eq("Town or city") |
|
|
|
|
expect(parser.log.county).to eq("County") |
|
|
|
|
expect(parser.log.postcode_full).to eq("DS1 1AA") |
|
|
|
|
expect(parser.log.la).to eq("E09000008") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "with a supported housing log" do |
|
|
|
|