[Catalyst] setting/getting session data from within tests

Yuval Kogman nothingmuch at woobling.org
Mon Jun 5 15:58:23 CEST 2006


On Mon, Jun 05, 2006 at 11:56:52 +0200, Daniel McBrearty wrote:
> thanks Yuval.
> 
> from what I can see though, you are just doing get_ok,
> content_contains, content_like here .. I don't see where you are
> actually manipulating the session data in the test itself, which is
> what I'm hoping for (dunno if it is actually doable yet ... )

Oh, you can't really...

The session exists only in the duration of the request cycle.

You need to write code that will do that stuff in some kind of
controller, and then query that. These requests should use the
session and return data the represents the test results.


Another, totally different approach is to mock $c and hand it over
to your actions, making sure they do the right thing.

-- 
  Yuval Kogman <nothingmuch at woobling.org>
http://nothingmuch.woobling.org  0xEBD27418

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060605/8975efad/attachment.pgp 


More information about the Catalyst mailing list