X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FCattySession.pm;h=ed910146cb5d6967658f94e4b2382a1c34e5b67f;hb=74649ca9f02a76226d0b0b92c499e6a1fb6e9bc4;hp=db1a4f58b916cb8784e566653a4fa75b528f9864;hpb=6bc863629dfa3bec1d938eb5a7af7ef68fd3849f;p=catagits%2FTest-WWW-Mechanize-Catalyst.git diff --git a/t/lib/CattySession.pm b/t/lib/CattySession.pm index db1a4f5..ed91014 100644 --- a/t/lib/CattySession.pm +++ b/t/lib/CattySession.pm @@ -1,51 +1,21 @@ package CattySession; use strict; +use warnings; -#use Catalyst; -use Catalyst qw/-Debug +use Catalyst qw/ Session Session::State::Cookie Session::Store::Dummy - /; +/; use Cwd; -use MIME::Base64; -our $VERSION = '0.01'; - -CattySession->config( +__PACKAGE__->config( name => 'CattySession', root => cwd . '/t/root', ); -CattySession->setup(); - -sub auto : Private { - my ( $self, $context ) = @_; - if ( $context->session ) { - return 1; - } - -} - -sub default : Private { - my ( $self, $context ) = @_; - my $html = html( "Root", "This is the root page" ); - $context->response->content_type("text/html"); - $context->response->output($html); -} - -sub html { - my ( $title, $body ) = @_; - return qq{ - -$title - -$body -Hello. - -}; -} +__PACKAGE__->setup; 1;