diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-03-15 09:45:29 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-03-15 09:45:29 -0500 |
commit | 96bc6bcfee704701de1a9c4c3c6a7c265610d34d (patch) | |
tree | 2abfc8ca7811643738de52bd3ebd4224bc774c27 /actionpack/test | |
parent | 16572fd46e189d80c6be7d499e687fe129053a2c (diff) | |
download | rails-96bc6bcfee704701de1a9c4c3c6a7c265610d34d.tar.gz rails-96bc6bcfee704701de1a9c4c3c6a7c265610d34d.tar.bz2 rails-96bc6bcfee704701de1a9c4c3c6a7c265610d34d.zip |
Don't force singularization of singleton resource names, e.g. /preferences [#4089 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index f60045bba6..17c645c04c 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -16,6 +16,7 @@ class AccountsController < ResourcesController; end class AdminController < ResourcesController; end class ProductsController < ResourcesController; end class ImagesController < ResourcesController; end +class PreferencesController < ResourcesController; end module Backoffice class ProductsController < ResourcesController; end @@ -1125,6 +1126,12 @@ class ResourcesTest < ActionController::TestCase end end + def test_singleton_resource_name_is_not_singularized + with_singleton_resources(:preferences) do + assert_singleton_restful_for :preferences + end + end + protected def with_restful_routing(*args) with_routing do |set| |