[Catalyst] [CATALYST] unit testing with sessions
Daniel McBrearty
danielmcbrearty at gmail.com
Sat Apr 22 22:40:48 CEST 2006
how do you go about writing unit tests when your code depends on session
variables?
I took a look at docs for Catalyst::Test, but it does not seem to address
this.
For instance:
sub home : Local
{
my ( $self, $c ) = @_;
my $lang = $c->session{lang};
if (defined $lang)
{
# render the page
}
else
{
# redirect somewhere
}
}
for a manual test, I cleared the cookie and reloaded ...
thanks
Daniel
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060422/e463d18f/attachment.htm
More information about the Catalyst
mailing list