7 use lib "$FindBin::Bin/lib";
\r
9 use Test::More tests => 5;
\r
10 use Catalyst::Test 'TestApp';
\r
12 # test defined static dirs
\r
13 TestApp->config->{static}->{dirs} = [
\r
17 TestApp->config->{static}->{debug} = 1;
\r
21 local *Catalyst::Log::_send_to_log;
\r
22 local our @MESSAGES;
\r
24 no warnings 'redefine';
\r
25 *Catalyst::Log::_send_to_log = sub {
\r
32 # a missing file in a defined static dir will return 404 and text/html
\r
33 ok( my $res = request('http://localhost/always-static/404.txt'), 'request ok' );
\r
34 is( $res->code, 404, '404 ok' );
\r
35 is( $res->content_type, 'text/html', '404 is text/html' );
\r
36 ok(defined $MESSAGES[0], 'debug message set');
\r
37 like( $MESSAGES[0], qr/404/, 'debug message contains 404');
\r