X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b01261760893de04dda650a427ceb59beea80004..90e46a58de583ac2bd7bb43077faa94186957a7a:/test/functional/old_node_controller_test.rb diff --git a/test/functional/old_node_controller_test.rb b/test/functional/old_node_controller_test.rb index 69ea0f345..3c0358c2b 100644 --- a/test/functional/old_node_controller_test.rb +++ b/test/functional/old_node_controller_test.rb @@ -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