summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-08 06:18:16 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-08 06:18:16 +0000
commitb6c920a976a1da347fd0a4a3cca168d6e12cc325 (patch)
tree9806958c73332ad3937059d68aa6192b4858e65d /test/integration
parent917d42733add932893d4e6e419654f0ea1ac2140 (diff)
downloadredmine-b6c920a976a1da347fd0a4a3cca168d6e12cc325.tar.gz
redmine-b6c920a976a1da347fd0a4a3cca168d6e12cc325.zip
test: route: split documents test whether scoped under project or not
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8549 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/routing/documents_test.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/integration/routing/documents_test.rb b/test/integration/routing/documents_test.rb
index 6c168d005..056f063b3 100644
--- a/test/integration/routing/documents_test.rb
+++ b/test/integration/routing/documents_test.rb
@@ -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' }
@@ -28,6 +28,13 @@ class RoutingDocumentsTest < ActionController::IntegrationTest
{ :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' }
)
@@ -36,10 +43,6 @@ class RoutingDocumentsTest < ActionController::IntegrationTest
{ :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' }
)