X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=t%2Flive_app.t;fp=t%2Flive_app.t;h=0cdb75e55de3782ef9c3b48293a1a25fd8a83ff6;hp=633a36ff3d97caff131df00e2abc89428e063d9b;hb=602b9593e1528d5d1085e3414400e6bc6458c1f6;hpb=ceda333d6452fe4fe53e627f3f8bfcb1d97b23ce diff --git a/t/live_app.t b/t/live_app.t index 633a36f..0cdb75e 100644 --- a/t/live_app.t +++ b/t/live_app.t @@ -3,6 +3,9 @@ use strict; use warnings; +use FindBin qw/$Bin/; +use lib "$Bin/lib"; + use Test::More; BEGIN { @@ -14,38 +17,6 @@ BEGIN { plan 'no_plan'; } -{ - - package CookieTestApp; - use Catalyst qw/ - Session - Session::Store::Dummy - Session::State::Cookie - /; - - sub page : Local { - my ( $self, $c ) = @_; - $c->res->body( "Hi! hit number " . ++$c->session->{counter} ); - } - - sub stream : Local { - my ( $self, $c ) = @_; - my $count = ++$c->session->{counter}; - $c->res->write("hit number "); - $c->res->write($count); - } - - sub deleteme : Local { - my ( $self, $c ) = @_; - my $id = $c->get_session_id; - $c->delete_session; - my $id2 = $c->get_session_id; - $c->res->body( $id ne ( $id2 || '' ) ); - } - - __PACKAGE__->setup; -} - use Test::WWW::Mechanize::Catalyst qw/CookieTestApp/; my $m = Test::WWW::Mechanize::Catalyst->new;