Add routing tests for all supported routes

This commit is contained in:
Tom Hughes 2012-03-09 18:28:06 +00:00
parent b012617608
commit 90e46a58de
24 changed files with 1028 additions and 16 deletions

View file

@ -8,6 +8,19 @@ class OldNodeControllerTest < ActionController::TestCase
# TODO: test history
#
##
# test all routes which lead to this controller
def test_routes
assert_routing(
{ :path => "/api/0.6/node/1/history", :method => :get },
{ :controller => "old_node", :action => "history", :id => "1" }
)
assert_routing(
{ :path => "/api/0.6/node/1/2", :method => :get },
{ :controller => "old_node", :action => "version", :id => "1", :version => "2" }
)
end
##
# test the version call by submitting several revisions of a new node
# to the API and ensuring that later calls to version return the