Add routing tests for all supported routes
This commit is contained in:
parent
b012617608
commit
90e46a58de
24 changed files with 1028 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue