aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/session_management_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/session_management_test.rb')
-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