# Session not storing flash message

**URL:** <https://www.ruby-forum.com/t/session-not-storing-flash-message/104457>\
**Category:** Rails\
**Created:** [May 18, 2007, 9:14am UTC](https://www.ruby-forum.com/t/session-not-storing-flash-message/104457 "2007-05-18T09:14:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdrdrd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/aeb1de/32.png) [@rdrdrd](https://www.ruby-forum.com/u/rdrdrd)\
**Post date:** [May 18, 2007, 9:14am UTC](https://www.ruby-forum.com/t/session-not-storing-flash-message/104457/1 "2007-05-18T09:14:24Z")

</div>

Hi all,

I faced a problem while writing functional tests, where the session  
wasn’t storing the flash message, even when the message was shown to  
be stored in the flash hash.

See the code :

This wasn’t working :

flash[:notice] = “Hi there”  
assert\_equal “Hi there”, flash[:notice]

But this was :

flash[:notice] = “Hi there”  
session[“flash”] = {:notice =\> “Hi there”}  
assert\_equal “Hi there”, flash[:notice]

Did anybody ever faced the same problem ?

~rd
