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