test: route: simplify repositories test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8496 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1812e68198
commit
5636228f79
|
@ -24,12 +24,19 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
:path => "/projects/redmine/repository" },
|
||||
{ :controller => 'repositories', :action => 'show', :id => 'redmine' }
|
||||
)
|
||||
["get", "post"].each do |method|
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
{ :method => method,
|
||||
:path => "/projects/redmine/repository/edit" },
|
||||
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
|
||||
)
|
||||
end
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/statistics" },
|
||||
{ :controller => 'repositories', :action => 'stats', :id => 'redmine' }
|
||||
)
|
||||
end
|
||||
|
||||
def test_repositories_revisions
|
||||
assert_routing(
|
||||
|
@ -81,7 +88,7 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
)
|
||||
end
|
||||
|
||||
def test_repositories_etc
|
||||
def test_repositories_non_revisions_path
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/diff/path/to/file.c" },
|
||||
|
@ -118,15 +125,5 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
{ :controller => 'repositories', :action => 'changes', :id => 'redmine',
|
||||
:path => %w[path to file.c] }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get',
|
||||
:path => "/projects/redmine/repository/statistics" },
|
||||
{ :controller => 'repositories', :action => 'stats', :id => 'redmine' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post',
|
||||
:path => "/projects/redmine/repository/edit" },
|
||||
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue