diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-10 10:41:24 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-10 10:41:24 -0800 |
commit | 522b72fd28b898c914cfbdbc31837e56702f60d5 (patch) | |
tree | 4d1322e4a692d3c1c4b4b2519bd80e068c3b6b8b /actionpack/test/dispatch | |
parent | a9a12700c72353397cf644073e58a3a1c60c30a2 (diff) | |
parent | 3092324ef4e2f6f096adfbcf92597502b3ce91aa (diff) | |
download | rails-522b72fd28b898c914cfbdbc31837e56702f60d5.tar.gz rails-522b72fd28b898c914cfbdbc31837e56702f60d5.tar.bz2 rails-522b72fd28b898c914cfbdbc31837e56702f60d5.zip |
Merge branch 'master' into instance_reader
* master:
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
make Range#overlaps? accept Range of Time
improved test case for partial indices
Made schema dumper recognize partial indices' where statements
Added where option to add_index to support postgresql partial indices
Diffstat (limited to 'actionpack/test/dispatch')
-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 1216193075..518d0333eb 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2449,6 +2449,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 |