Drop geocoder.us from search engines

Fixes #1633
This commit is contained in:
Tom Hughes 2017-09-25 22:52:03 +01:00
parent 429641bd90
commit 6209a9be78
5 changed files with 1 additions and 58 deletions

View file

@ -15,10 +15,6 @@ class GeocoderControllerTest < ActionController::TestCase
{ :path => "/geocoder/search_latlon", :method => :get },
{ :controller => "geocoder", :action => "search_latlon" }
)
assert_routing(
{ :path => "/geocoder/search_us_postcode", :method => :get },
{ :controller => "geocoder", :action => "search_us_postcode" }
)
assert_routing(
{ :path => "/geocoder/search_uk_postcode", :method => :get },
{ :controller => "geocoder", :action => "search_uk_postcode" }
@ -253,7 +249,7 @@ class GeocoderControllerTest < ActionController::TestCase
].each do |code|
post :search, :params => { :query => code }
assert_response :success
assert_equal %w[us_postcode osm_nominatim], assigns(:sources)
assert_equal %w[osm_nominatim], assigns(:sources)
end
end
@ -304,25 +300,6 @@ class GeocoderControllerTest < ActionController::TestCase
results_check_error "Longitude 180.23 out of range"
end
##
# Test the US postcode search
def test_search_us_postcode
with_http_stubs "geocoder_us" do
get :search_us_postcode, :xhr => true,
:params => { :query => "90210", :zoom => 10,
:minlon => -0.559, :minlat => 51.217,
:maxlon => 0.836, :maxlat => 51.766 }
results_check :prefix => "Beverly Hills, CA,", :name => "90210",
:lat => 34.088808, :lon => -118.40612
get :search_us_postcode, :xhr => true,
:params => { :query => "00000", :zoom => 10,
:minlon => -0.559, :minlat => 51.217,
:maxlon => 0.836, :maxlat => 51.766 }
results_check
end
end
##
# Test the UK postcode search
def test_search_uk_postcode