Commits

Toshi MARUYAMA committed 4da0ecf

test: route: split queries tests

  • Participants
  • Parent commits 1c99787

Comments (0)

Files changed (1)

File test/integration/routing/queries_test.rb

         { :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' }
       )
         { :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