diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-10 10:00:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-10 10:01:06 -0800 |
commit | 73fcbaaa788f781a15d1fe7f8fae2e4b53c799fa (patch) | |
tree | 46bc9c3e044480b200354a755e3b4b0487f9b112 /actionpack/test/dispatch/routing_test.rb | |
parent | 6d17b3677886438b208326df75b7d7ad6e7eadb4 (diff) | |
download | rails-73fcbaaa788f781a15d1fe7f8fae2e4b53c799fa.tar.gz rails-73fcbaaa788f781a15d1fe7f8fae2e4b53c799fa.tar.bz2 rails-73fcbaaa788f781a15d1fe7f8fae2e4b53c799fa.zip |
Merge pull request #4988 from kennyj/fix_4720-3
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 1e2668e435..3922e3628d 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2448,6 +2448,32 @@ class TestAppendingRoutes < ActionDispatch::IntegrationTest end end +class TestNamespaceWithControllerOption < ActionDispatch::IntegrationTest + module ::Admin + class StorageFilesController < ActionController::Base + def index + render :text => "admin/storage_files#index" + end + end + end + + DefaultScopeRoutes = ActionDispatch::Routing::RouteSet.new + DefaultScopeRoutes.draw do + namespace :admin do + resources :storage_files, :controller => "StorageFiles" + end + end + + def app + DefaultScopeRoutes + end + + def test_controller_options + get '/admin/storage_files' + assert_equal "admin/storage_files#index", @response.body + end +end + class TestDefaultScope < ActionDispatch::IntegrationTest module ::Blog class PostsController < ActionController::Base |