diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2007-05-17 01:27:54 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2007-05-17 01:27:54 +0000 |
commit | 04823ff48fbde3ecf7849a1e1a3d3bcc4cc71aa8 (patch) | |
tree | f85eef6cfbac872e8bf8fa416781a9f946982e7d /actionpack/test/controller | |
parent | 40486288efea032808901a39787058f0d456cf16 (diff) | |
download | rails-04823ff48fbde3ecf7849a1e1a3d3bcc4cc71aa8.tar.gz rails-04823ff48fbde3ecf7849a1e1a3d3bcc4cc71aa8.tar.bz2 rails-04823ff48fbde3ecf7849a1e1a3d3bcc4cc71aa8.zip |
Allow nested namespaces in routing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 45e4003021..1f61377ad9 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -17,6 +17,10 @@ class AdminController < ResourcesController; end module Backoffice class ProductsController < ResourcesController; end + + module Admin + class ProductsController < ResourcesController; end + end end class ResourcesTest < Test::Unit::TestCase @@ -400,6 +404,20 @@ class ResourcesTest < Test::Unit::TestCase end end + def test_resources_in_nested_namespace + with_routing do |set| + set.draw do |map| + map.namespace :backoffice do |backoffice| + backoffice.namespace :admin do |admin| + admin.resources :products + end + end + end + + assert_simply_restful_for :products, :controller => "backoffice/admin/products", :name_prefix => 'backoffice_admin_', :path_prefix => 'backoffice/admin/' + end + end + def test_resources_using_namespace with_routing do |set| set.draw do |map| |