From 5636228f798a08204d2488219f331c489e470735 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 4 Jan 2012 08:50:36 +0000 Subject: [PATCH] test: route: simplify repositories test git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8496 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing/repositories_test.rb | 25 ++++++++----------- 1 file 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 -- 2.39.5