aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorFlorent Piteau <florent.piteau@sylogix.net>2011-04-20 02:10:29 +0800
committerJosé Valim <jose.valim@gmail.com>2011-04-20 04:32:26 +0800
commit89ed9fbd1917e431e489dc856042d996d0f088c5 (patch)
tree004d79e332ab71baab5f8aadbac51b4d23199c4d /actionpack/test/controller
parent22fcef90b185199563719fc511346bf4c2f5bbff (diff)
downloadrails-89ed9fbd1917e431e489dc856042d996d0f088c5.tar.gz
rails-89ed9fbd1917e431e489dc856042d996d0f088c5.tar.bz2
rails-89ed9fbd1917e431e489dc856042d996d0f088c5.zip
Don't reuse a closed flash when using now
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/flash_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb
index 7b5bf8b21a..e19612eace 100644
--- a/actionpack/test/controller/flash_test.rb
+++ b/actionpack/test/controller/flash_test.rb
@@ -272,6 +272,14 @@ class FlashIntegrationTest < ActionDispatch::IntegrationTest
end
end
+ def test_setting_flash_now_does_not_raise_in_following_requests
+ with_test_route_set do
+ env = { 'action_dispatch.request.flash_hash' => ActionDispatch::Flash::FlashHash.new }
+ get '/set_flash_now', nil, env
+ get '/set_flash_now', 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 }