Skip to content

Instantly share code, notes, and snippets.

@skaji
Created July 29, 2017 00:40
Show Gist options
  • Save skaji/19e1093b265d67e3327be9824d145567 to your computer and use it in GitHub Desktop.
Save skaji/19e1093b265d67e3327be9824d145567 to your computer and use it in GitHub Desktop.
diff --git t/message.t t/message.t
index 75640e3..4b286b6 100644
--- t/message.t
+++ t/message.t
@@ -571,7 +571,6 @@ $m = HTTP::Message->new(['Content-Encoding' => 'zog']);
is($m->decode, 0);
$m = HTTP::Message->new;
ok($m->decode);
-$m->content;
is($m->content(undef), '');
eval { $m->content(\'foo'); };
like($@, qr/Can't set content to be a scalar reference/);
diff --git t/request.t t/request.t
index 1b2797f..9b40451 100644
--- t/request.t
+++ t/request.t
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Test::More;
-plan tests => 26;
+plan tests => 22;
use HTTP::Request;
use Try::Tiny qw( catch try );
@@ -124,9 +124,3 @@ is($req->dump, <<EOT);
(no content)
EOT
-
-$r2 = HTTP::Request->parse( undef );
-is( $r2->method, undef );
-is( $r2->uri, undef );
-is( $r2->protocol, undef );
-is( $r2->header("Accept-Encoding"), $req->header("Accept-Encoding") );
diff --git t/response.t t/response.t
index cd0bbda..c0d40a6 100644
--- t/response.t
+++ t/response.t
@@ -113,7 +113,7 @@ is($r->base, "http://www.sn.no/2/;a=/foo/bar");
$r->push_header("Content-Base", "/3/");
is($r->base, "http://www.sn.no/2/;a=/foo/bar");
-$r2 = HTTP::Response->parse(undef);
+$r2 = HTTP::Response->new;
is($r2->code, undef);
is($r2->message, undef);
is($r2->protocol, undef);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment