]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/old_way_controller_test.rb
Add routing tests for all supported routes
[rails.git] / test / functional / old_way_controller_test.rb
index 9dd542c525490856d9c826df7ae67d075e350273..f0ab6bd859409fc0fb3452dd8af335a25bebea60 100644 (file)
@@ -4,6 +4,19 @@ require 'old_way_controller'
 class OldWayControllerTest < ActionController::TestCase
   api_fixtures
 
+  ##
+  # test all routes which lead to this controller
+  def test_routes
+    assert_routing(
+      { :path => "/api/0.6/way/1/history", :method => :get },
+      { :controller => "old_way", :action => "history", :id => "1" }
+    )
+    assert_routing(
+      { :path => "/api/0.6/way/1/2", :method => :get },
+      { :controller => "old_way", :action => "version", :id => "1", :version => "2" }
+    )
+  end
+
   # -------------------------------------
   # Test reading old ways.
   # -------------------------------------