summaryrefslogtreecommitdiffstats
path: root/test/integration/routing
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-04 08:50:36 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-04 08:50:36 +0000
commit5636228f798a08204d2488219f331c489e470735 (patch)
treedc7ac93fb9113e3b06bb67bdd2c01f9e01375abd /test/integration/routing
parent1812e68198cba3c60af7aa68159b6eb6cda2d1c1 (diff)
downloadredmine-5636228f798a08204d2488219f331c489e470735.tar.gz
redmine-5636228f798a08204d2488219f331c489e470735.zip
test: route: simplify repositories test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8496 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing')
-rw-r--r--test/integration/routing/repositories_test.rb25
1 files changed, 11 insertions, 14 deletions
diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb
index 6378fd0bc..8caa0e9e6 100644
--- a/test/integration/routing/repositories_test.rb
+++ b/test/integration/routing/repositories_test.rb
@@ -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