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

@ -4,6 +4,19 @@ require 'old_relation_controller'
class OldRelationControllerTest < ActionController::TestCase
api_fixtures
##
# test all routes which lead to this controller
def test_routes
assert_routing(
{ :path => "/api/0.6/relation/1/history", :method => :get },
{ :controller => "old_relation", :action => "history", :id => "1" }
)
assert_routing(
{ :path => "/api/0.6/relation/1/2", :method => :get },
{ :controller => "old_relation", :action => "version", :id => "1", :version => "2" }
)
end
# -------------------------------------
# Test reading old relations.
# -------------------------------------