[Catalyst-commits] r11138 - in
Catalyst-Plugin-Static-Simple/trunk/t: . lib/TestApp/root/files
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sun Aug 16 08:59:54 GMT 2009
Author: rafl
Date: 2009-08-16 08:59:54 +0000 (Sun, 16 Aug 2009)
New Revision: 11138
Added:
Catalyst-Plugin-Static-Simple/trunk/t/lib/TestApp/root/files/empty.txt
Modified:
Catalyst-Plugin-Static-Simple/trunk/t/04static.t
Log:
Add test for delivering empty files.
Modified: Catalyst-Plugin-Static-Simple/trunk/t/04static.t
===================================================================
--- Catalyst-Plugin-Static-Simple/trunk/t/04static.t 2009-08-13 12:50:19 UTC (rev 11137)
+++ Catalyst-Plugin-Static-Simple/trunk/t/04static.t 2009-08-16 08:59:54 UTC (rev 11138)
@@ -10,7 +10,7 @@
my $has_space_file = -e "$FindBin::Bin/lib/TestApp/root/files/space file.txt";
use Test::More;
-plan tests => ($has_space_file) ? 10 : 7;
+plan tests => ($has_space_file) ? 12 : 9;
use Catalyst::Test 'TestApp';
# test getting a css file
@@ -32,3 +32,6 @@
# test unknown extension
ok( $res = request('http://localhost/files/err.omg'), 'request ok' );
is( $res->content_type, 'text/plain', 'unknown extension as text/plain ok' );
+
+ok( $res = request('http://localhost/files/empty.txt'), 'request ok' );
+is( $res->content, '', 'empty files result in an empty response' );
Added: Catalyst-Plugin-Static-Simple/trunk/t/lib/TestApp/root/files/empty.txt
===================================================================
More information about the Catalyst-commits
mailing list