X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7917a7db800eec3b35a71ceb74404dde1518a9dc..326d4ecec0ca0817567912f5d45b904df4c5b054:/test/controllers/geocoder_controller_test.rb 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