Remove npemap as a source for UK postcodes

This commit is contained in:
Tom Hughes 2018-01-29 18:53:57 +00:00
parent 673b58f96f
commit 5925039729
5 changed files with 1 additions and 62 deletions

View file

@ -13,10 +13,6 @@ class GeocoderControllerTest < ActionController::TestCase
{ :path => "/geocoder/search_latlon", :method => :get },
{ :controller => "geocoder", :action => "search_latlon" }
)
assert_routing(
{ :path => "/geocoder/search_uk_postcode", :method => :get },
{ :controller => "geocoder", :action => "search_uk_postcode" }
)
assert_routing(
{ :path => "/geocoder/search_ca_postcode", :method => :get },
{ :controller => "geocoder", :action => "search_ca_postcode" }
@ -263,7 +259,7 @@ class GeocoderControllerTest < ActionController::TestCase
"CR2 6XH",
"DN55 1PT"
].each do |code|
search_check code, %w[uk_postcode osm_nominatim]
search_check code, %w[osm_nominatim]
end
end
@ -298,24 +294,6 @@ class GeocoderControllerTest < ActionController::TestCase
results_check_error "Longitude 180.23 out of range"
end
##
# Test the UK postcode search
def test_search_uk_postcode
with_http_stubs "npemap" do
get :search_uk_postcode, :xhr => true,
:params => { :query => "CV4 7AL", :zoom => 10,
:minlon => -0.559, :minlat => 51.217,
:maxlon => 0.836, :maxlat => 51.766 }
results_check :name => "CV4 7AL", :lat => 52.381748701968, :lon => -1.56176420939232
get :search_uk_postcode, :xhr => true,
:params => { :query => "XX9 9XX", :zoom => 10,
:minlon => -0.559, :minlat => 51.217,
:maxlon => 0.836, :maxlat => 51.766 }
results_check
end
end
##
# Test the Canadian postcode search
def test_search_ca_postcode

View file

@ -1,10 +0,0 @@
/cgi/geocoder.fcgi?format=text&postcode=CV4%207AL:
code: 200
body: |
# Easting,Northing,Matched Postcode,Latitude,Longitude
429926,276058,'CV4 7AL',52.381748701968,-1.56176420939232
/cgi/geocoder.fcgi?format=text&postcode=XX9%209XX:
code: 200
body: |
Error: Postcode area 'XX' not found, postcode probably invalid