diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-30 10:09:04 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-30 10:09:04 +0000 |
commit | 1a8338dbaf1ff3f7f412bc189d08b958e0ed4f7e (patch) | |
tree | 9a760515e4e209bb34de571a2a101421aca81992 /test/integration/routing/issues_test.rb | |
parent | 11946ecd876f14249508fb0ed3a8fd5e3071b2e5 (diff) | |
download | redmine-1a8338dbaf1ff3f7f412bc189d08b958e0ed4f7e.tar.gz redmine-1a8338dbaf1ff3f7f412bc189d08b958e0ed4f7e.zip |
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
Diffstat (limited to 'test/integration/routing/issues_test.rb')
-rw-r--r-- | test/integration/routing/issues_test.rb | 44 |
1 files 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 @@ -77,6 +95,10 @@ class RoutingIssuesTest < ActionController::IntegrationTest :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 |