|
|
|
@ -242,6 +242,9 @@ RSpec.describe BulkUpload::Sales::Year2024::RowParser do |
|
|
|
stub_request(:get, /api\.postcodes\.io/) |
|
|
|
stub_request(:get, /api\.postcodes\.io/) |
|
|
|
.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, "https://api.os.uk/search/places/v1/find?key=OS_DATA_KEY&maxresults=10&minmatch=0.4&query=some%20street,%20some%20town,%20,%20,%20EC1N%202TD") |
|
|
|
|
|
|
|
.to_return(status: 200, body: { results: [{ DPA: { postcode: "12345" } }] }.to_json, headers: {}) |
|
|
|
|
|
|
|
|
|
|
|
parser.valid? |
|
|
|
parser.valid? |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|