X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1891efef06872740184a2abc9ecfdb9f263c9ba5..dfbb95270782d4a290b77b7b513b5b7d9d52732a:/test/controllers/geocoder_controller_test.rb diff --git a/test/controllers/geocoder_controller_test.rb b/test/controllers/geocoder_controller_test.rb index 483c37dba..57d5a10f1 100644 --- a/test/controllers/geocoder_controller_test.rb +++ b/test/controllers/geocoder_controller_test.rb @@ -45,6 +45,16 @@ class GeocoderControllerTest < ActionController::TestCase ) end + ## + # Test identification with no arguments + def test_identify_error + get :search + assert_response :bad_request + + xhr :get, :search + assert_response :bad_request + end + ## # Test identification of basic lat/lon pairs def test_identify_latlon_basic @@ -377,7 +387,7 @@ class GeocoderControllerTest < ActionController::TestCase "min-lat" => 51.7265723, "max-lat" => 51.7665723, "min-lon" => -0.0390782, "max-lon" => 0.0009218, "type" => "node", "id" => 28825933 }, - { "prefix" => "City Boundary", + { "prefix" => "Village", "name" => "Broxbourne, Hertfordshire, East of England, England, United Kingdom", "min-lat" => 51.6808751, "max-lat" => 51.7806237, "min-lon" => -0.114204, "max-lon" => 0.0145267, @@ -436,7 +446,7 @@ class GeocoderControllerTest < ActionController::TestCase xhr :get, :search_osm_nominatim_reverse, :lat => 51.7632, :lon => -0.0076, :zoom => 17 results_check :name => "Dinant Link Road, Broxbourne, Hertfordshire, East of England, England, EN11 8HX, United Kingdom", :lat => 51.7634883, :lon => -0.0088373, - :type => "way", :id => 3489841, :zoom => 17 + :type => "way", :id => 3489841, :zoom => 17 end end