6 use Test::More tests => 6;
7 use Test::MockObject::Extends;
11 BEGIN { use_ok( $m = "Catalyst::Plugin::Session" ) }
13 my $c = Test::MockObject::Extends->new( $m );
15 $c->set_always( get_session_data => { __expires => time+10000, __updated => time } );
16 $c->set_always( config => { session => { expires => 1000000 } } );
18 $c->sessionid("deadbeef");
22 is_deeply( $c->flash, {}, "nothing in flash");
24 $c->flash->{foo} = "moose";
29 is_deeply( $c->flash, { foo => "moose" }, "one key in flash" );
31 $c->flash->{bar} = "gorch";
33 is_deeply( $c->flash, { foo => "moose", bar => "gorch" }, "two keys in flash");
38 is_deeply( $c->flash, { bar => "gorch" }, "one key in flash" );
43 is_deeply( $c->flash, {}, "nothing in flash");