diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-19 10:34:17 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-19 10:34:17 +0200 |
commit | 6380f1a9f45e68f38480c0805cac62eb6708f72e (patch) | |
tree | 40405ff1dd415282e05e89c505d7c69d14639172 /actionpack/test/controller | |
parent | 3bff8bdb2ae0d16cb051c6bfae326837f5f20ee0 (diff) | |
download | rails-6380f1a9f45e68f38480c0805cac62eb6708f72e.tar.gz rails-6380f1a9f45e68f38480c0805cac62eb6708f72e.tar.bz2 rails-6380f1a9f45e68f38480c0805cac62eb6708f72e.zip |
Be sure to not store the closed flash in the session.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/flash_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb index 9c89f1334d..7b5bf8b21a 100644 --- a/actionpack/test/controller/flash_test.rb +++ b/actionpack/test/controller/flash_test.rb @@ -264,6 +264,14 @@ class FlashIntegrationTest < ActionDispatch::IntegrationTest end end + def test_setting_flash_does_not_raise_in_following_requests + with_test_route_set do + env = { 'action_dispatch.request.flash_hash' => ActionDispatch::Flash::FlashHash.new } + get '/set_flash', nil, env + get '/set_flash', nil, env + end + end + def test_setting_flash_raises_after_stream_back_to_client_even_with_an_empty_flash with_test_route_set do env = { 'action_dispatch.request.flash_hash' => ActionDispatch::Flash::FlashHash.new } @@ -294,7 +302,6 @@ class FlashIntegrationTest < ActionDispatch::IntegrationTest end end - private # Overwrite get to send SessionSecret in env hash |