X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7917a7db800eec3b35a71ceb74404dde1518a9dc..4f3576e91bcad927f037cd0f5a962960b9b2a8b5:/test/controllers/geocoder_controller_test.rb?ds=inline diff --git a/test/controllers/geocoder_controller_test.rb b/test/controllers/geocoder_controller_test.rb index 5ea02f76d..ac9905589 100644 --- a/test/controllers/geocoder_controller_test.rb +++ b/test/controllers/geocoder_controller_test.rb @@ -429,8 +429,8 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_template :layout => "map" assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources).pluck(:name) assert_nil @controller.params[:query] - assert_match(/^[+-]?\d+(?:\.\d*)?$/, @controller.params[:lat]) - assert_match(/^[+-]?\d+(?:\.\d*)?$/, @controller.params[:lon]) + assert_match(/^[+-]?\d+(?:\.\d+)?$/, @controller.params[:lat]) + assert_match(/^[+-]?\d+(?:\.\d+)?$/, @controller.params[:lon]) assert_in_delta lat, @controller.params[:lat].to_f assert_in_delta lon, @controller.params[:lon].to_f @@ -440,8 +440,8 @@ class GeocoderControllerTest < ActionDispatch::IntegrationTest assert_template :layout => "xhr" assert_equal %w[latlon osm_nominatim_reverse], assigns(:sources).pluck(:name) assert_nil @controller.params[:query] - assert_match(/^[+-]?\d+(?:\.\d*)?$/, @controller.params[:lat]) - assert_match(/^[+-]?\d+(?:\.\d*)?$/, @controller.params[:lon]) + assert_match(/^[+-]?\d+(?:\.\d+)?$/, @controller.params[:lat]) + assert_match(/^[+-]?\d+(?:\.\d+)?$/, @controller.params[:lon]) assert_in_delta lat, @controller.params[:lat].to_f assert_in_delta lon, @controller.params[:lon].to_f end