From 1a8338dbaf1ff3f7f412bc189d08b958e0ed4f7e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 30 Dec 2011 10:09:04 +0000 Subject: [PATCH] test: route: rearrange issues tests for each scopes git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8437 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing/issues_test.rb | 44 ++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/test/integration/routing/issues_test.rb b/test/integration/routing/issues_test.rb index 7b95360b1..dc04b7713 100644 --- a/test/integration/routing/issues_test.rb +++ b/test/integration/routing/issues_test.rb @@ -54,6 +54,24 @@ class RoutingIssuesTest < ActionController::IntegrationTest { :controller => 'issues', :action => 'show', :id => '64', :format => 'xml' } ) + assert_routing( + { :method => 'post', :path => "/issues.xml" }, + { :controller => 'issues', :action => 'create', :format => 'xml' } + ) + assert_routing( + { :method => 'get', :path => "/issues/64/edit" }, + { :controller => 'issues', :action => 'edit', :id => '64' } + ) + assert_routing( + { :method => 'put', :path => "/issues/1.xml" }, + { :controller => 'issues', :action => 'update', :id => '1', + :format => 'xml' } + ) + assert_routing( + { :method => 'delete', :path => "/issues/1.xml" }, + { :controller => 'issues', :action => 'destroy', :id => '1', + :format => 'xml' } + ) end def test_issues_rest_actions_scoped_under_project @@ -76,6 +94,10 @@ class RoutingIssuesTest < ActionController::IntegrationTest { :controller => 'issues', :action => 'index', :project_id => '23', :format => 'xml' } ) + assert_routing( + { :method => 'post', :path => "/projects/23/issues" }, + { :controller => 'issues', :action => 'create', :project_id => '23' } + ) assert_routing( { :method => 'get', :path => "/projects/23/issues/new" }, { :controller => 'issues', :action => 'new', :project_id => '23' } @@ -87,28 +109,6 @@ class RoutingIssuesTest < ActionController::IntegrationTest { :method => 'post', :path => "/projects/23/issues/new" }, { :controller => 'issues', :action => 'new', :project_id => '23' } ) - assert_routing( - { :method => 'post', :path => "/projects/23/issues" }, - { :controller => 'issues', :action => 'create', :project_id => '23' } - ) - assert_routing( - { :method => 'post', :path => "/issues.xml" }, - { :controller => 'issues', :action => 'create', :format => 'xml' } - ) - assert_routing( - { :method => 'get', :path => "/issues/64/edit" }, - { :controller => 'issues', :action => 'edit', :id => '64' } - ) - assert_routing( - { :method => 'put', :path => "/issues/1.xml" }, - { :controller => 'issues', :action => 'update', :id => '1', - :format => 'xml' } - ) - assert_routing( - { :method => 'delete', :path => "/issues/1.xml" }, - { :controller => 'issues', :action => 'destroy', :id => '1', - :format => 'xml' } - ) end def test_issues_extra_actions