session_enabled? works with session :off. Closes #6680.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-02-27 06:36:25 +00:00
parent 88876163f9
commit df7ca38d7d
3 changed files with 14 additions and 1 deletions

@ -1,5 +1,7 @@
*SVN*
* session_enabled? works with session :off. #6680 [Catfish]
* Added :port and :host handling to UrlRewriter (which unified url_for usage, regardless of whether it's called in view or controller) #7616 [alancfrancis]
* Allow send_file/send_data to use a registered mime type as the :type parameter #7620 [jonathan]

@ -585,7 +585,7 @@ def controller_path
end
def session_enabled?
request.session_options[:disabled] != false
request.session_options && request.session_options[:disabled] != false
end
# View load paths for controller.

@ -142,4 +142,15 @@ def test_process_cleanup_with_session_management_support
get :tell
assert_equal "does not have cached associations", @response.body
end
def test_session_is_enabled
@controller = TestController.new
get :show
assert_nothing_raised do
assert_equal false, @controller.session_enabled?
end
get :tell
assert @controller.session_enabled?
end
end