X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Static-Simple.git;a=blobdiff_plain;f=t%2F05dirs.t;h=8fdeccaf89ae47ece1cf42af2f2bc58a90042216;hp=fa5db8a7cd750f0c775fdfd21e8608ee6cb4a00e;hb=c8ee8fd29adb4074cd205c6c7bc66a743eb80a53;hpb=9d557523c282d8ada38cc70a35cd742ae7ec2f9e diff --git a/t/05dirs.t b/t/05dirs.t index fa5db8a..8fdecca 100644 --- a/t/05dirs.t +++ b/t/05dirs.t @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/lib"; -use Test::More tests => 8; +use Test::More tests => 10; use Catalyst::Test 'TestApp'; # test defined static dirs @@ -20,6 +20,10 @@ TestApp->config->{static}->{dirs} = [ ok( my $res = request('http://localhost/always-static/test'), 'request ok' ); is( $res->content_type, 'text/plain', 'text/plain ok' ); +# a file with an extension in ignore_extensions still gets served +ok( $res = request('http://localhost/always-static/test.html'), 'request ok' ); +is( $res->code, 200, 'html file in dirs get served' ); + # a missing file in a defined static dir will return 404 ok( $res = request('http://localhost/always-static/404.txt'), 'request ok' ); is( $res->code, 404, '404 ok' );