aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-07-22 10:56:53 +0000
committerJamis Buck <jamis@37signals.com>2005-07-22 10:56:53 +0000
commitd76439239dc7b8870afef34afccfedcd1ffd7ad0 (patch)
treec12a15b90b275546d4d8d4fb3898145db219a1a9 /actionpack
parent06843f8794ad8c0368ece9ab57e340052f758025 (diff)
downloadrails-d76439239dc7b8870afef34afccfedcd1ffd7ad0.tar.gz
rails-d76439239dc7b8870afef34afccfedcd1ffd7ad0.tar.bz2
rails-d76439239dc7b8870afef34afccfedcd1ffd7ad0.zip
Add unit test to ensure that session management options are inherited and overridable in subclasses
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/session_management_test.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/controller/session_management_test.rb b/actionpack/test/controller/session_management_test.rb
index fef94f8263..707c4287f1 100644
--- a/actionpack/test/controller/session_management_test.rb
+++ b/actionpack/test/controller/session_management_test.rb
@@ -26,6 +26,18 @@ class SessionManagementTest < Test::Unit::TestCase
end
end
+ class SpecializedController < SessionOffController
+ session :disabled => false, :only => :something
+
+ def something
+ render_text "done"
+ end
+
+ def another
+ render_text "done"
+ end
+ end
+
def setup
@request, @response = ActionController::TestRequest.new,
ActionController::TestResponse.new
@@ -47,4 +59,12 @@ class SessionManagementTest < Test::Unit::TestCase
assert_instance_of Hash, @request.session_options
assert @request.session_options[:session_secure]
end
+
+ def test_controller_specialization_overrides_settings
+ @controller = SpecializedController.new
+ get :something
+ assert_instance_of Hash, @request.session_options
+ get :another
+ assert_equal false, @request.session_options
+ end
end