diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-01-05 10:17:15 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-01-05 10:17:15 +0000 |
commit | 93a0daa383755e5c1100ba8bf826461a2bc0df72 (patch) | |
tree | ad112bd8585225f14c9f8f6798d08b3eb3ecbdf3 /test/integration/routing | |
parent | e97db2589d1842363b924c99ff1a5d11674c2fd3 (diff) | |
download | redmine-93a0daa383755e5c1100ba8bf826461a2bc0df72.tar.gz redmine-93a0daa383755e5c1100ba8bf826461a2bc0df72.zip |
test: route: repositories: add show, changes and annotate actions in revisions scope
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8517 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing')
-rw-r--r-- | test/integration/routing/repositories_test.rb | 31 |
1 files changed, 31 insertions, 0 deletions
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" }, @@ -64,6 +65,30 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest ) 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" }, { :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457' } @@ -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 |