]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/geocoder_controller_test.rb
Merge remote-tracking branch 'openstreetmap/pull/1553'
[rails.git] / test / controllers / geocoder_controller_test.rb
index bc75a9bfb529d981b5bc4ef41232d903e67b849a..c64efa4e5177019301f93c4af02b2670f574f95a 100644 (file)
@@ -253,7 +253,7 @@ class GeocoderControllerTest < ActionController::TestCase
     ].each do |code|
       post :search, :query => code
       assert_response :success
-      assert_equal %w(us_postcode osm_nominatim), assigns(:sources)
+      assert_equal %w[us_postcode osm_nominatim], assigns(:sources)
     end
   end
 
@@ -269,20 +269,20 @@ class GeocoderControllerTest < ActionController::TestCase
       "CR2 6XH",
       "DN55 1PT"
     ].each do |code|
-      search_check code, %w(uk_postcode osm_nominatim)
+      search_check code, %w[uk_postcode osm_nominatim]
     end
   end
 
   ##
   # Test identification of Canadian postcodes
   def test_identify_ca_postcode
-    search_check "A1B 2C3", %w(ca_postcode osm_nominatim)
+    search_check "A1B 2C3", %w[ca_postcode osm_nominatim]
   end
 
   ##
   # Test identification fall through to the default case
   def test_identify_default
-    search_check "foo bar baz", %w(osm_nominatim geonames)
+    search_check "foo bar baz", %w[osm_nominatim geonames]
   end
 
   ##
@@ -387,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,
@@ -446,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
 
@@ -467,7 +467,7 @@ class GeocoderControllerTest < ActionController::TestCase
     assert_response :success
     assert_template :search
     assert_template :layout => "map"
-    assert_equal %w(latlon osm_nominatim_reverse geonames_reverse), assigns(:sources)
+    assert_equal %w[latlon osm_nominatim_reverse geonames_reverse], assigns(:sources)
     assert_nil @controller.params[:query]
     assert_in_delta lat, @controller.params[:lat]
     assert_in_delta lon, @controller.params[:lon]
@@ -476,7 +476,7 @@ class GeocoderControllerTest < ActionController::TestCase
     assert_response :success
     assert_template :search
     assert_template :layout => "xhr"
-    assert_equal %w(latlon osm_nominatim_reverse geonames_reverse), assigns(:sources)
+    assert_equal %w[latlon osm_nominatim_reverse geonames_reverse], assigns(:sources)
     assert_nil @controller.params[:query]
     assert_in_delta lat, @controller.params[:lat]
     assert_in_delta lon, @controller.params[:lon]