Codebase list libfurl-perl / 2dec2c5
failing test case for Furl#response tokuhirom 11 years ago
1 changed file(s) with 15 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1414
1515 my $furl = Furl->new(keep_request => 1);
1616
17 # GET
17 # request(GET)
1818 {
1919 my $res = $furl->request(url => "http://127.0.0.1:$port/foo", method => "GET");
2020 is $res->code, 200, "request()";
2626 is $req->method => 'GET';
2727 }
2828
29 # POST
29 # request(POST)
3030 {
3131 my $res = $furl->request(url => "http://127.0.0.1:$port/foo", method => "POST", content => 'GAH');
32 is $res->code, 200, "request()";
33 can_ok $res => 'request';
34
35 my $req = $res->request;
36 isa_ok $req => 'Furl::Request';
37 is $req->uri => "http://127.0.0.1:$port/foo";
38 is $req->method => 'POST';
39 is $req->content => 'GAH';
40 }
41
42 # ->post
43 {
44 my $res = $furl->post("http://127.0.0.1:$port/foo", [], 'GAH');
3245 is $res->code, 200, "request()";
3346 can_ok $res => 'request';
3447