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