9 use Test::More tests => 6;
11 use Catalyst::Test 'TestApp';
12 use HTTP::Request::Common;
14 my $response = request POST '/cgi-bin/test.cgi', [
19 is($response->content, 'foo:bar bar:baz', 'POST to CGI');
21 $response = request POST '/cgi-bin/test.cgi', [
24 ], 'Content-Type' => 'form-data';
26 is($response->content, 'foo:bar bar:baz', 'POST to CGI (form-data)');
28 $response = request POST '/cgi-bin/test.cgi',
30 foo => 1, bar => 2, baz => [ undef, 'baz', Content => 3 ],
32 'Content-Type' => 'form-data';
35 local $TODO = 'WrapCGI does not yet construct multipart/form-data requests';
36 is($response->content, 'foo:1 bar:2 baz:3', 'POST with file upload');
39 $response = request '/cgi-bin/test_pathinfo.cgi/path/%2Finfo';
40 is($response->content, '/path/%2Finfo', 'PATH_INFO is correct');
42 $response = request '/cgi-bin/test_filepathinfo.cgi/path/%2Finfo';
43 is($response->content, '/test_filepath_info/path/%2Finfo',
44 'FILEPATH_INFO is correct (maybe)');
46 $response = request '/cgi-bin/test_scriptname.cgi/foo/bar';
47 is($response->content, '/cgi-bin/test_scriptname.cgi',
48 'SCRIPT_NAME is correct');