]> source.dussan.org Git - redmine.git/commitdiff
test: route: split documents test whether scoped under project or not
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 8 Jan 2012 06:18:16 +0000 (06:18 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 8 Jan 2012 06:18:16 +0000 (06:18 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8549 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing/documents_test.rb

index 6c168d00504063d7c584c2ab7441c89d2ba3e5a5..056f063b3da242f755812aa59343d08051b2daf2 100644 (file)
@@ -18,7 +18,7 @@
 require File.expand_path('../../../test_helper', __FILE__)
 
 class RoutingDocumentsTest < ActionController::IntegrationTest
-  def test_documents
+  def test_documents_scoped_under_project
     assert_routing(
         { :method => 'get', :path => "/projects/567/documents" },
         { :controller => 'documents', :action => 'index', :project_id => '567' }
@@ -27,6 +27,13 @@ class RoutingDocumentsTest < ActionController::IntegrationTest
         { :method => 'get', :path => "/projects/567/documents/new" },
         { :controller => 'documents', :action => 'new', :project_id => '567' }
       )
+    assert_routing(
+        { :method => 'post', :path => "/projects/567/documents" },
+        { :controller => 'documents', :action => 'create', :project_id => '567' }
+      )
+  end
+
+  def test_documents
     assert_routing(
         { :method => 'get', :path => "/documents/22" },
         { :controller => 'documents', :action => 'show', :id => '22' }
@@ -35,10 +42,6 @@ class RoutingDocumentsTest < ActionController::IntegrationTest
         { :method => 'get', :path => "/documents/22/edit" },
         { :controller => 'documents', :action => 'edit', :id => '22' }
       )
-    assert_routing(
-        { :method => 'post', :path => "/projects/567/documents" },
-        { :controller => 'documents', :action => 'create', :project_id => '567' }
-      )
     assert_routing(
         { :method => 'put', :path => "/documents/22" },
         { :controller => 'documents', :action => 'update', :id => '22' }