X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9c3a66ac3b24133d979d8d3e4a4d2397ff04b706..5995e2b3239b6d51d2403c81087b95034af1a8af:/test/controllers/geocoder_controller_test.rb diff --git a/test/controllers/geocoder_controller_test.rb b/test/controllers/geocoder_controller_test.rb index d62eb35b7..d32521c3b 100644 --- a/test/controllers/geocoder_controller_test.rb +++ b/test/controllers/geocoder_controller_test.rb @@ -37,9 +37,11 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest def test_identify_latlon_basic [ "50.06773 14.37742", + "50.06773/14.37742", "50.06773, 14.37742", "+50.06773 +14.37742", - "+50.06773, +14.37742" + "+50.06773, +14.37742", + "+50.06773/+14.37742" ].each do |code| latlon_check code, 50.06773, 14.37742 end @@ -364,7 +366,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :search assert_template :layout => "map" - assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources) + assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources).pluck(:name) assert_nil @controller.params[:query] assert_in_delta lat, @controller.params[:lat] assert_in_delta lon, @controller.params[:lon] @@ -373,7 +375,7 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :search assert_template :layout => "xhr" - assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources) + assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources).pluck(:name) assert_nil @controller.params[:query] assert_in_delta lat, @controller.params[:lat] assert_in_delta lon, @controller.params[:lon] @@ -384,13 +386,13 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template :search assert_template :layout => "map" - assert_equal sources, assigns(:sources) + assert_equal sources, assigns(:sources).pluck(:name) get search_path(:query => query), :xhr => true assert_response :success assert_template :search assert_template :layout => "xhr" - assert_equal sources, assigns(:sources) + assert_equal sources, assigns(:sources).pluck(:name) end def results_check(*results)