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:
Toshi MARUYAMA 2012-01-04 08:50:36 +00:00
parent 1812e68198
commit 5636228f79
1 changed files with 11 additions and 14 deletions

View File

@ -24,11 +24,18 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
:path => "/projects/redmine/repository" },
{ :controller => 'repositories', :action => 'show', :id => 'redmine' }
)
["get", "post"].each do |method|
assert_routing(
{ :method => method,
:path => "/projects/redmine/repository/edit" },
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
)
end
assert_routing(
{ :method => 'get',
:path => "/projects/redmine/repository/edit" },
{ :controller => 'repositories', :action => 'edit', :id => 'redmine' }
)
:path => "/projects/redmine/repository/statistics" },
{ :controller => 'repositories', :action => 'stats', :id => 'redmine' }
)
end
def test_repositories_revisions
@ -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