diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-29 21:51:20 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-29 21:51:20 +0000 |
commit | 2e1601cf27e35ac3c81fc7de7ae90158c0dd1f84 (patch) | |
tree | 4edfc92c62b2c31af6c5162e60c84ab4b27882c9 /test/integration/routing/queries_test.rb | |
parent | e754883df2f8a9cbc5e31ec0efba4bf3161f8f86 (diff) | |
download | redmine-2e1601cf27e35ac3c81fc7de7ae90158c0dd1f84.tar.gz redmine-2e1601cf27e35ac3c81fc7de7ae90158c0dd1f84.zip |
test: route: split queries tests
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8424 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing/queries_test.rb')
-rw-r--r-- | test/integration/routing/queries_test.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/test/integration/routing/queries_test.rb b/test/integration/routing/queries_test.rb index 8c75b2453..0495a63cb 100644 --- a/test/integration/routing/queries_test.rb +++ b/test/integration/routing/queries_test.rb @@ -32,18 +32,10 @@ class RoutingQueriesTest < ActionController::IntegrationTest { :controller => 'queries', :action => 'new' } ) assert_routing( - { :method => 'get', :path => "/projects/redmine/queries/new" }, - { :controller => 'queries', :action => 'new', :project_id => 'redmine' } - ) - assert_routing( { :method => 'post', :path => "/queries" }, { :controller => 'queries', :action => 'create' } ) assert_routing( - { :method => 'post', :path => "/projects/redmine/queries" }, - { :controller => 'queries', :action => 'create', :project_id => 'redmine' } - ) - assert_routing( { :method => 'get', :path => "/queries/1/edit" }, { :controller => 'queries', :action => 'edit', :id => '1' } ) @@ -56,4 +48,15 @@ class RoutingQueriesTest < ActionController::IntegrationTest { :controller => 'queries', :action => 'destroy', :id => '1' } ) end + + def test_queries_scoped_under_project + assert_routing( + { :method => 'get', :path => "/projects/redmine/queries/new" }, + { :controller => 'queries', :action => 'new', :project_id => 'redmine' } + ) + assert_routing( + { :method => 'post', :path => "/projects/redmine/queries" }, + { :controller => 'queries', :action => 'create', :project_id => 'redmine' } + ) + end end |