Static::Simple 0.15, fixed issue where dirs config option did not quote metachars
[catagits/Catalyst-Plugin-Static-Simple.git] / t / 06include_path.t
CommitLineData
e37ad815 1#!perl\r
2\r
3use strict;\r
4use warnings;\r
5\r
6use FindBin;\r
7use lib "$FindBin::Bin/lib";\r
8\r
9use Test::More tests => 6;\r
10use Catalyst::Test 'TestApp';\r
11\r
12# test altenate root dirs\r
13TestApp->config->{static}->{include_path} = [\r
14 TestApp->config->{root} . '/overlay',\r
15 \&TestApp::incpath_generator,\r
16 TestApp->config->{root},\r
17];\r
18\r
19# test overlay dir\r
20ok( my $res = request('http://localhost/overlay.jpg'), 'request ok' );\r
21is( $res->content_type, 'image/jpeg', 'overlay path ok' );\r
22\r
23# test incpath_generator\r
24ok( $res = request('http://localhost/incpath.css'), 'request ok' );\r
25is( $res->content_type, 'text/css', 'incpath coderef ok' );\r
26\r
27# test passthrough to root\r
28ok( $res = request('http://localhost/images/bad.gif'), 'request ok' );\r
29is( $res->content_type, 'image/gif', 'root path ok' );\r