7 use lib "$FindBin::Bin/lib";
\r
9 use Test::More tests => 6;
\r
10 use Catalyst::Test 'TestApp';
\r
12 # test altenate root dirs
\r
13 TestApp->config->{static}->{include_path} = [
\r
14 TestApp->config->{root} . '/overlay',
\r
15 \&TestApp::incpath_generator,
\r
16 TestApp->config->{root},
\r
20 ok( my $res = request('http://localhost/overlay.jpg'), 'request ok' );
\r
21 is( $res->content_type, 'image/jpeg', 'overlay path ok' );
\r
23 # test incpath_generator
\r
24 ok( $res = request('http://localhost/incpath.css'), 'request ok' );
\r
25 is( $res->content_type, 'text/css', 'incpath coderef ok' );
\r
27 # test passthrough to root
\r
28 ok( $res = request('http://localhost/images/bad.gif'), 'request ok' );
\r
29 is( $res->content_type, 'image/gif', 'root path ok' );
\r