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
This commit is contained in:
Toshi MARUYAMA 2011-12-30 10:09:04 +00:00
parent 11946ecd87
commit 1a8338dbaf
1 changed files with 22 additions and 22 deletions

View File

@ -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