7 use lib "$FindBin::Bin/lib";
\r
9 use Test::More tests => 7;
\r
10 use Catalyst::Test 'TestApp';
\r
12 # test getting a css file
\r
13 ok( my $res = request('http://localhost/files/static.css'), 'request ok' );
\r
14 is( $res->content_type, 'text/css', 'content-type text/css ok' );
\r
15 like( $res->content, qr/background/, 'content of css ok' );
\r
17 # test a non-existent file
\r
18 ok( $res = request('http://localhost/files/404.txt'), 'request ok' );
\r
19 is( $res->content, 'default', 'default handler for non-existent content ok' );
\r
21 # test unknown extension
\r
22 ok( $res = request('http://localhost/files/err.omg'), 'request ok' );
\r
23 is( $res->content_type, 'text/plain', 'unknown extension as text/plain ok' );
\r