diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-30 10:07:56 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-30 10:07:56 +0000 |
commit | 11946ecd876f14249508fb0ed3a8fd5e3071b2e5 (patch) | |
tree | 2d4c31f1fbe57dbaa5035cfecf6abc2b806fdc10 /test/integration/routing | |
parent | 96de4a0822043061c868ca14218f44ea195d025d (diff) | |
download | redmine-11946ecd876f14249508fb0ed3a8fd5e3071b2e5.tar.gz redmine-11946ecd876f14249508fb0ed3a8fd5e3071b2e5.zip |
test: route: split versions tests whether scoped under project or not
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8436 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing')
-rw-r--r-- | test/integration/routing/versions_test.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/integration/routing/versions_test.rb b/test/integration/routing/versions_test.rb index 01cf2e99f..932a9c5f5 100644 --- a/test/integration/routing/versions_test.rb +++ b/test/integration/routing/versions_test.rb @@ -18,13 +18,18 @@ require File.expand_path('../../../test_helper', __FILE__) class RoutingVersionsTest < ActionController::IntegrationTest - def test_versions + def test_versions_scoped_under_project # /projects/foo/versions is /projects/foo/roadmap assert_routing( { :method => 'get', :path => "/projects/33/roadmap" }, { :controller => 'versions', :action => 'index', :project_id => '33' } ) assert_routing( + { :method => 'put', :path => "/projects/foo/versions/close_completed" }, + { :controller => 'versions', :action => 'close_completed', + :project_id => 'foo' } + ) + assert_routing( { :method => 'get', :path => "/projects/foo/versions.xml" }, { :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'xml' } @@ -54,6 +59,9 @@ class RoutingVersionsTest < ActionController::IntegrationTest { :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'json' } ) + end + + def test_versions assert_routing( { :method => 'get', :path => "/versions/1" }, { :controller => 'versions', :action => 'show', :id => '1' } @@ -101,11 +109,6 @@ class RoutingVersionsTest < ActionController::IntegrationTest :format => 'json' } ) assert_routing( - { :method => 'put', :path => "/projects/foo/versions/close_completed" }, - { :controller => 'versions', :action => 'close_completed', - :project_id => 'foo' } - ) - assert_routing( { :method => 'post', :path => "/versions/1/status_by" }, { :controller => 'versions', :action => 'status_by', :id => '1' } ) |