diff options
author | Scott Taylor <scott@railsnewbie.com> | 2009-01-29 19:39:48 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-01-29 19:39:48 -0600 |
commit | 2dedb5b03ab88a1c31068f71c8d4cad7c5a5d9ae (patch) | |
tree | 7429cf580c86e7c306216cf5f5f2287daab8564d /actionpack/test/controller | |
parent | 1b79683171eeb0f5eb07928aeace890dafe773fc (diff) | |
download | rails-2dedb5b03ab88a1c31068f71c8d4cad7c5a5d9ae.tar.gz rails-2dedb5b03ab88a1c31068f71c8d4cad7c5a5d9ae.tar.bz2 rails-2dedb5b03ab88a1c31068f71c8d4cad7c5a5d9ae.zip |
Controller, response, and request should all refer to same session, even after a call to session_reset [#1823 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/test_test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index ee7b8ade8c..65c894c2e7 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -23,6 +23,11 @@ class TestTest < ActionController::TestCase render :text => 'Success' end + def reset_the_session + reset_session + render :text => 'ignore me' + end + def render_raw_post raise ActiveSupport::TestCase::Assertion, "#raw_post is blank" if request.raw_post.blank? render :text => request.raw_post @@ -171,6 +176,24 @@ XML assert_equal 'value2', session[:symbol] end + def test_session_is_cleared_from_controller_after_reset_session + process :set_session + process :reset_the_session + assert_equal Hash.new, @controller.session.to_hash + end + + def test_session_is_cleared_from_response_after_reset_session + process :set_session + process :reset_the_session + assert_equal Hash.new, @response.session.to_hash + end + + def test_session_is_cleared_from_request_after_reset_session + process :set_session + process :reset_the_session + assert_equal Hash.new, @request.session.to_hash + end + def test_process_with_request_uri_with_no_params process :test_uri assert_equal "/test_test/test/test_uri", @response.body |