[Catalyst-commits] r9915 - in trunk/Catalyst-Controller-WrapCGI/t:
. lib/TestApp/Controller
hdp at dev.catalyst.perl.org
hdp at dev.catalyst.perl.org
Tue Apr 28 17:47:29 GMT 2009
Author: hdp
Date: 2009-04-28 18:47:29 +0100 (Tue, 28 Apr 2009)
New Revision: 9915
Modified:
trunk/Catalyst-Controller-WrapCGI/t/lib/TestApp/Controller/Root.pm
trunk/Catalyst-Controller-WrapCGI/t/wrap-cgi.t
Log:
failing (TODO) test for multipart/form-data
Modified: trunk/Catalyst-Controller-WrapCGI/t/lib/TestApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Controller-WrapCGI/t/lib/TestApp/Controller/Root.pm 2009-04-28 17:41:26 UTC (rev 9914)
+++ trunk/Catalyst-Controller-WrapCGI/t/lib/TestApp/Controller/Root.pm 2009-04-28 17:47:29 UTC (rev 9915)
@@ -9,6 +9,9 @@
my $cgi = CGI->new;
print $cgi->header;
print 'foo:',$cgi->param('foo'),' bar:',$cgi->param('bar');
+ if (my $fh = $cgi->param('baz')) {
+ print 'baz:',<$fh>;
+ }
};
sub handle_cgi : Path('/cgi-bin/test.cgi') {
Modified: trunk/Catalyst-Controller-WrapCGI/t/wrap-cgi.t
===================================================================
--- trunk/Catalyst-Controller-WrapCGI/t/wrap-cgi.t 2009-04-28 17:41:26 UTC (rev 9914)
+++ trunk/Catalyst-Controller-WrapCGI/t/wrap-cgi.t 2009-04-28 17:47:29 UTC (rev 9915)
@@ -6,7 +6,7 @@
use FindBin '$Bin';
use lib "$Bin/lib";
-use Test::More tests => 5;
+use Test::More tests => 6;
use Catalyst::Test 'TestApp';
use HTTP::Request::Common;
@@ -25,6 +25,17 @@
is($response->content, 'foo:bar bar:baz', 'POST to CGI (form-data)');
+$response = request POST '/cgi-bin/test.cgi',
+ Content => [
+ foo => 1, bar => 2, baz => [ undef, 'baz', Content => 3 ],
+ ],
+ 'Content-Type' => 'form-data';
+
+{
+ local $TODO = 'WrapCGI does not yet construct multipart/form-data requests';
+ is($response->content, 'foo:1 bar:2 baz:3', 'POST with file upload');
+}
+
$response = request '/cgi-bin/test_pathinfo.cgi/path/%2Finfo';
is($response->content, '/path/%2Finfo', 'PATH_INFO is correct');
More information about the Catalyst-commits
mailing list