6 use HTTP::Request::Common;
8 use lib "$FindBin::Bin/lib";
9 use Catalyst::Test 'TestFromPSGI';
12 ok my $response = request GET '/from_psgi_array',
13 'got welcome from a catalyst controller';
15 is $response->content, 'helloworldtoday',
16 'expected content body /from_psgi_array';
20 ok my $response = request GET '/from_psgi_code',
21 'got welcome from a catalyst controller';
23 is $response->content, 'helloworldtoday2',
24 'expected content body /from_psgi_code';
28 ok my $response = request GET '/from_psgi_code_itr',
29 'got welcome from a catalyst controller';
31 is $response->content, 'helloworldtoday3',
32 'expected content body /from_psgi_code_itr';
36 ok my($res, $c) = ctx_request(POST '/test_psgi_keys?a=1&b=2', [c=>3,d=>4]);
38 ok $c->req->env->{"psgix.input.buffered"}, "input is buffered";
40 is $c->req->parameters->get('c'), 3;
41 is $c->req->parameters->get('d'), 4;
42 is $c->req->parameters->get('a'), 1;
43 is $c->req->parameters->get('b'), 2;
45 is $c->req->body_parameters->get('c'), 3;
46 is $c->req->body_parameters->get('d'), 4;
47 is $c->req->query_parameters->get('a'), 1;
48 is $c->req->query_parameters->get('b'), 2;