X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5449cf4adcc1fad4b9f43426e6d3e4a8f65e6fbb..c8fb5ad24c5751bd2d43b86e4359381d200af066:/test/functional/search_controller_test.rb diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index a213253ec..7fd060dc4 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -1,8 +1,24 @@ require File.dirname(__FILE__) + '/../test_helper' class SearchControllerTest < ActionController::TestCase - # Replace this with your real tests. - def test_truth - assert true + ## + # test all routes which lead to this controller + def test_routes + assert_routing( + { :path => "/api/0.6/search", :method => :get }, + { :controller => "search", :action => "search_all" } + ) + assert_routing( + { :path => "/api/0.6/nodes/search", :method => :get }, + { :controller => "search", :action => "search_nodes" } + ) + assert_routing( + { :path => "/api/0.6/ways/search", :method => :get }, + { :controller => "search", :action => "search_ways" } + ) + assert_routing( + { :path => "/api/0.6/relations/search", :method => :get }, + { :controller => "search", :action => "search_relations" } + ) end end