X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/18883b59c88940b9bd323756e60603302f185dfd..6aca6cfabf21da48567e8197457dae8785b7324d:/test/functional/api_controller_test.rb diff --git a/test/functional/api_controller_test.rb b/test/functional/api_controller_test.rb index 9226e3892..adc433fe0 100644 --- a/test/functional/api_controller_test.rb +++ b/test/functional/api_controller_test.rb @@ -18,6 +18,31 @@ class ApiControllerTest < ActionController::TestCase # reall reject it, however this is to test to see if the api changes. end + ## + # test all routes which lead to this controller + def test_routes + assert_routing( + { :path => "/api/capabilities", :method => :get }, + { :controller => "api", :action => "capabilities" } + ) + assert_recognizes( + { :controller => "api", :action => "capabilities" }, + { :path => "/api/0.6/capabilities", :method => :get } + ) + assert_routing( + { :path => "/api/0.6/map", :method => :get }, + { :controller => "api", :action => "map" } + ) + assert_routing( + { :path => "/api/0.6/trackpoints", :method => :get }, + { :controller => "api", :action => "trackpoints" } + ) + assert_routing( + { :path => "/api/0.6/changes", :method => :get }, + { :controller => "api", :action => "changes" } + ) + end + # ------------------------------------- # Test reading a bounding box. # -------------------------------------