diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 2a88a9eae..9c1d6ff4e 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -45,6 +45,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest end def test_repositories_revisions + empty_path_param = [] assert_routing( { :method => 'get', :path => "/projects/redmine/repository/revisions" }, @@ -62,6 +63,30 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :controller => 'repositories', :action => 'revision', :id => 'redmine', :rev => '2457' } ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2457/show" }, + { :controller => 'repositories', :action => 'show', :id => 'redmine', + :path => empty_path_param, :rev => '2457' } + ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2457/show/#{@path_hash[:path]}" }, + { :controller => 'repositories', :action => 'show', :id => 'redmine', + :path => @path_hash[:param] , :rev => '2457'} + ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2457/changes" }, + { :controller => 'repositories', :action => 'changes', :id => 'redmine', + :path => empty_path_param, :rev => '2457' } + ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2457/changes/#{@path_hash[:path]}" }, + { :controller => 'repositories', :action => 'changes', :id => 'redmine', + :path => @path_hash[:param] , :rev => '2457'} + ) assert_routing( { :method => 'get', :path => "/projects/redmine/repository/revisions/2457/diff" }, @@ -92,6 +117,12 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest { :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => @path_hash[:param], :rev => '2', :format => 'raw' } ) + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/revisions/2/annotate/#{@path_hash[:path]}" }, + { :controller => 'repositories', :action => 'annotate', :id => 'redmine', + :path => @path_hash[:param], :rev => '2' } + ) end def test_repositories_non_revisions_path