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
This commit is contained in:
parent
17d19febc6
commit
66d62504ef
|
@ -132,31 +132,6 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
||||||
{ :controller => 'repositories', :action => 'show', :id => 'redmine',
|
{ :controller => 'repositories', :action => 'show', :id => 'redmine',
|
||||||
:path => @path_hash[:param] , :rev => '2457'}
|
:path => @path_hash[:param] , :rev => '2457'}
|
||||||
)
|
)
|
||||||
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(
|
assert_routing(
|
||||||
{ :method => 'get',
|
{ :method => 'get',
|
||||||
:path => "/projects/redmine/repository/revisions/2457/diff" },
|
:path => "/projects/redmine/repository/revisions/2457/diff" },
|
||||||
|
@ -226,31 +201,6 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
||||||
{ :controller => 'repositories', :action => 'show', :id => 'redmine', :repository_id => 'foo',
|
{ :controller => 'repositories', :action => 'show', :id => 'redmine', :repository_id => 'foo',
|
||||||
:path => @path_hash[:param] , :rev => '2457'}
|
:path => @path_hash[:param] , :rev => '2457'}
|
||||||
)
|
)
|
||||||
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(
|
assert_routing(
|
||||||
{ :method => 'get',
|
{ :method => 'get',
|
||||||
:path => "/projects/redmine/repository/foo/revisions/2457/diff" },
|
:path => "/projects/redmine/repository/foo/revisions/2457/diff" },
|
||||||
|
@ -290,6 +240,31 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_repositories_non_revisions_path
|
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(
|
assert_routing(
|
||||||
{ :method => 'get',
|
{ :method => 'get',
|
||||||
:path => "/projects/redmine/repository/diff/#{@path_hash[:path]}" },
|
:path => "/projects/redmine/repository/diff/#{@path_hash[:path]}" },
|
||||||
|
@ -334,6 +309,33 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_repositories_non_revisions_path_with_repository_id
|
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(
|
assert_routing(
|
||||||
{ :method => 'get',
|
{ :method => 'get',
|
||||||
:path => "/projects/redmine/repository/foo/diff/#{@path_hash[:path]}" },
|
:path => "/projects/redmine/repository/foo/diff/#{@path_hash[:path]}" },
|
||||||
|
|
Loading…
Reference in New Issue