test: route: split repository route test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8404 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ac51ab12f0
commit
6178780a3d
|
@ -29,6 +29,9 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
:path => "/projects/redmine/repository/edit" },
|
||||
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
|
||||
)
|
||||
end
|
||||
|
||||
def test_repositories_revisions
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/revisions" },
|
||||
|
@ -58,18 +61,33 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
{ :controller => 'repositories', :action => 'diff', :id => 'redmine',
|
||||
:rev => '2457', :format => 'diff' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/diff/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'diff', :id => 'redmine',
|
||||
:path => %w[path to file.c] }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/revisions/2/diff/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'diff', :id => 'redmine',
|
||||
:path => %w[path to file.c], :rev => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'entry', :id => 'redmine',
|
||||
:path => %w[path to file.c], :rev => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'entry', :id => 'redmine',
|
||||
:path => %w[path to file.c], :rev => '2', :format => 'raw' }
|
||||
)
|
||||
end
|
||||
|
||||
def test_repositories_etc
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/diff/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'diff', :id => 'redmine',
|
||||
:path => %w[path to file.c] }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/browse/path/to/file.c" },
|
||||
|
@ -82,24 +100,12 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
{ :controller => 'repositories', :action => 'entry', :id => 'redmine',
|
||||
:path => %w[path to file.c] }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'entry', :id => 'redmine',
|
||||
:path => %w[path to file.c], :rev => '2' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/raw/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'entry', :id => 'redmine',
|
||||
:path => %w[path to file.c], :format => 'raw' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" },
|
||||
{ :controller => 'repositories', :action => 'entry', :id => 'redmine',
|
||||
:path => %w[path to file.c], :rev => '2', :format => 'raw' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/annotate/path/to/file.c" },
|
||||
|
|
Loading…
Reference in New Issue