].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
"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
##
"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,
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]
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]