X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fd6f00b069af5a7b87227ea4c3401dc461d7311a..f9d714dfd36fa56ced4c0a99a6e59c945ff89cca:/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