]> git.openstreetmap.org Git - rails.git/blob - test/functional/geocoder_controller_test.rb
Update Potlatch 2 to 2.3-468-ge4a2053 build
[rails.git] / test / functional / geocoder_controller_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'geocoder_controller'
3
4 class GeocoderControllerTest < ActionController::TestCase
5   ##
6   # test all routes which lead to this controller
7   def test_routes
8     assert_routing(
9       { :path => "/geocoder/search", :method => :post },
10       { :controller => "geocoder", :action => "search" }
11     )
12     assert_routing(
13       { :path => "/geocoder/search_latlon", :method => :get },
14       { :controller => "geocoder", :action => "search_latlon" }
15     )
16     assert_routing(
17       { :path => "/geocoder/search_us_postcode", :method => :get },
18       { :controller => "geocoder", :action => "search_us_postcode" }
19     )
20     assert_routing(
21       { :path => "/geocoder/search_uk_postcode", :method => :get },
22       { :controller => "geocoder", :action => "search_uk_postcode" }
23     )
24     assert_routing(
25       { :path => "/geocoder/search_ca_postcode", :method => :get },
26       { :controller => "geocoder", :action => "search_ca_postcode" }
27     )
28     assert_routing(
29       { :path => "/geocoder/search_osm_namefinder", :method => :get },
30       { :controller => "geocoder", :action => "search_osm_namefinder" }
31     )
32     assert_routing(
33       { :path => "/geocoder/search_osm_nominatim", :method => :get },
34       { :controller => "geocoder", :action => "search_osm_nominatim" }
35     )
36     assert_routing(
37       { :path => "/geocoder/search_geonames", :method => :get },
38       { :controller => "geocoder", :action => "search_geonames" }
39     )
40
41     assert_routing(
42       { :path => "/geocoder/description", :method => :post },
43       { :controller => "geocoder", :action => "description" }
44     )
45     assert_routing(
46       { :path => "/geocoder/description_osm_namefinder", :method => :get },
47       { :controller => "geocoder", :action => "description_osm_namefinder" }
48     )
49     assert_routing(
50       { :path => "/geocoder/description_osm_nominatim", :method => :get },
51       { :controller => "geocoder", :action => "description_osm_nominatim" }
52     )
53     assert_routing(
54       { :path => "/geocoder/description_geonames", :method => :get },
55       { :controller => "geocoder", :action => "description_geonames" }
56     )
57   end
58 end