]> source.dussan.org Git - redmine.git/commitdiff
test: route: split queries tests
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 29 Dec 2011 21:51:20 +0000 (21:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 29 Dec 2011 21:51:20 +0000 (21:51 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8424 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing/queries_test.rb

index 8c75b2453e0efe750121a6f8f87c393bf5b37b4a..0495a63cb85419ebf4a1d8f4e51715313d254207 100644 (file)
@@ -31,18 +31,10 @@ class RoutingQueriesTest < ActionController::IntegrationTest
         { :method => 'get', :path => "/queries/new" },
         { :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