X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp.pm;fp=t%2Flib%2FTestApp.pm;h=001fb01b93d1a526fc42e7552ab4fcdafc788d87;hb=ab02ca0d1f663f389eef9d4b000c05392304c06a;hp=d118a5535b411fb2321747b2222e461ca8a8cf45;hpb=c9dea3698e53fe69f0c4279749c26978e7bc4d38;p=catagits%2FCatalyst-Plugin-Static-Simple.git diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm index d118a55..001fb01 100644 --- a/t/lib/TestApp.pm +++ b/t/lib/TestApp.pm @@ -2,11 +2,14 @@ package TestApp; use strict; use Catalyst; +use File::Spec::Functions; +use FindBin; our $VERSION = '0.01'; TestApp->config( name => 'TestApp', + debug => 1, ); my @plugins = qw/Static::Simple/; @@ -44,4 +47,20 @@ sub subtest2 : Local { $c->res->output( 'subtest2 ok' ); } +sub serve_static : Local { + my ( $self, $c ) = @_; + + my $file = catfile( $FindBin::Bin, 'lib', 'TestApp.pm' ); + + $c->serve_static_file( $file ); +} + +sub serve_static_404 : Local { + my ( $self, $c ) = @_; + + my $file = catfile( $FindBin::Bin, 'lib', 'foo.pm' ); + + $c->serve_static_file( $file ); +} + 1;