]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/geocoder_controller_test.rb
Merge remote-tracking branch 'upstream/pull/5095'
[rails.git] / test / controllers / geocoder_controller_test.rb
index 5ea02f76d2261af73025f00ebaf1426bb630e9e7..ac9905589bd949cf7390ff9cedd140624e92c2dd 100644 (file)
@@ -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