diff options
author | Samuel Cochran <sj26@sj26.com> | 2015-01-29 23:00:44 +1100 |
---|---|---|
committer | Samuel Cochran <sj26@sj26.com> | 2015-01-29 23:00:44 +1100 |
commit | 3a102d052803f7f066e648454297301310d69906 (patch) | |
tree | 704c61e698e9b69b1034b2d93333580b9c166bde /actionpack/lib | |
parent | 74c2961bd864f633c79c03e62c2cb142642201c5 (diff) | |
download | rails-3a102d052803f7f066e648454297301310d69906.tar.gz rails-3a102d052803f7f066e648454297301310d69906.tar.bz2 rails-3a102d052803f7f066e648454297301310d69906.zip |
Fix flash remaining after last flash deleted
Inside a controller functional test after the last flash is deleted it
still persists the flash because to_session_value is nil. We should
delete it from the session when the serialized version is nil, same as
the flash middleware.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index d30615fade..10ad80d22c 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -643,6 +643,8 @@ module ActionController if flash_value = @request.flash.to_session_value @request.session['flash'] = flash_value + else + @request.session.delete('flash') end @response |