diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-05 05:29:43 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-05 05:29:43 +0000 |
commit | 66d62504ef2d88b2a673e40b827fdd1c3c407e16 (patch) | |
tree | efbed0f120252d594a5cf9bd193606b3dc0e4543 /test/integration | |
parent | 17d19febc64733962562a8cfc61317f4c8c2a688 (diff) | |
download | redmine-66d62504ef2d88b2a673e40b827fdd1c3c407e16.tar.gz redmine-66d62504ef2d88b2a673e40b827fdd1c3c407e16.zip |
test: route: scm: move changes action tests to non revisions path tests
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9627 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/routing/repositories_test.rb | 102 |
1 files changed, 52 insertions, 50 deletions
diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 17d391801..2351721bb 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -134,31 +134,6 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest ) assert_routing( { :method => 'get', - :path => "/projects/redmine/repository/changes" }, - { :controller => 'repositories', :action => 'changes', :id => 'redmine' } - ) - ['2457', 'master', 'slash/slash'].each do |rev| - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/changes" }, - { :controller => 'repositories', :action => 'changes', :id => 'redmine', - :rev => rev }, - {}, - { :rev => rev } - ) - end - ['2457', 'master', 'slash/slash'].each do |rev| - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/changes/#{@path_hash[:path]}" }, - { :controller => 'repositories', :action => 'changes', :id => 'redmine', - :path => @path_hash[:param], :rev => rev }, - {}, - { :rev => rev } - ) - end - assert_routing( - { :method => 'get', :path => "/projects/redmine/repository/revisions/2457/diff" }, { :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457' } @@ -228,31 +203,6 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest ) assert_routing( { :method => 'get', - :path => "/projects/redmine/repository/foo/changes" }, - { :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo' } - ) - ['2457', 'master', 'slash/slash'].each do |rev| - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/foo/changes" }, - { :controller => 'repositories', :action => 'changes', :id => 'redmine', - :repository_id => 'foo', :rev => rev }, - {}, - { :rev => rev } - ) - end - ['2457', 'master', 'slash/slash'].each do |rev| - assert_routing( - { :method => 'get', - :path => "/projects/redmine/repository/foo/changes/#{@path_hash[:path]}" }, - { :controller => 'repositories', :action => 'changes', :id => 'redmine', - :repository_id => 'foo', :path => @path_hash[:param], :rev => rev }, - {}, - { :rev => rev } - ) - end - assert_routing( - { :method => 'get', :path => "/projects/redmine/repository/foo/revisions/2457/diff" }, { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo', :rev => '2457' } @@ -292,6 +242,31 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest def test_repositories_non_revisions_path assert_routing( { :method => 'get', + :path => "/projects/redmine/repository/changes" }, + { :controller => 'repositories', :action => 'changes', :id => 'redmine' } + ) + ['2457', 'master', 'slash/slash'].each do |rev| + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/changes" }, + { :controller => 'repositories', :action => 'changes', :id => 'redmine', + :rev => rev }, + {}, + { :rev => rev } + ) + end + ['2457', 'master', 'slash/slash'].each do |rev| + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/changes/#{@path_hash[:path]}" }, + { :controller => 'repositories', :action => 'changes', :id => 'redmine', + :path => @path_hash[:param], :rev => rev }, + {}, + { :rev => rev } + ) + end + assert_routing( + { :method => 'get', :path => "/projects/redmine/repository/diff/#{@path_hash[:path]}" }, { :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => @path_hash[:param] } @@ -336,6 +311,33 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest def test_repositories_non_revisions_path_with_repository_id assert_routing( { :method => 'get', + :path => "/projects/redmine/repository/foo/changes" }, + { :controller => 'repositories', :action => 'changes', + :id => 'redmine', :repository_id => 'foo' } + ) + ['2457', 'master', 'slash/slash'].each do |rev| + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/foo/changes" }, + { :controller => 'repositories', :action => 'changes', + :id => 'redmine', + :repository_id => 'foo', :rev => rev }, + {}, + { :rev => rev } + ) + end + ['2457', 'master', 'slash/slash'].each do |rev| + assert_routing( + { :method => 'get', + :path => "/projects/redmine/repository/foo/changes/#{@path_hash[:path]}" }, + { :controller => 'repositories', :action => 'changes', :id => 'redmine', + :repository_id => 'foo', :path => @path_hash[:param], :rev => rev }, + {}, + { :rev => rev } + ) + end + assert_routing( + { :method => 'get', :path => "/projects/redmine/repository/foo/diff/#{@path_hash[:path]}" }, { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo', :path => @path_hash[:param] } |