Skip to content

Commit a462f3a

Browse files
committed
add regression test for message()
1 parent 341423f commit a462f3a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/response.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66

77
use Test::More;
8-
plan tests => 29;
8+
plan tests => 30;
99

1010
use HTTP::Date;
1111
use HTTP::Request;
@@ -84,7 +84,9 @@ is($freshness_lifetime, 10);
8484
ok($r->fresh_until); # should return something
8585
ok($r->fresh_until(heuristic_expiry => 0)); # should return something
8686

87-
my $r2 = HTTP::Response->parse($r->as_string);
87+
my $r2 = HTTP::Response->parse($r->as_string( "\x0d\x0a"));
88+
is( $r2->message(), 'OK', 'message() returns as expected' );
89+
8890
my @h = $r2->header('Cache-Control');
8991
is(@h, 2);
9092

0 commit comments

Comments
 (0)