]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/old_relation_controller_test.rb
Add routing tests for all supported routes
[rails.git] / test / functional / old_relation_controller_test.rb
index 54e1cd037fad660bfc39ef2e4604b18db6550d20..89676a175a8f38872f0455246ab96de4dede3135 100644 (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.
   # -------------------------------------