X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1f8a68371ad34594cce4aadf5fef229588fd4ddc..dd65315136084770dbcbcce4f08cdee8e683af66:/test/functional/search_controller_test.rb?ds=sidebyside 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