summaryrefslogtreecommitdiff
path: root/t/spore-response/body.t
diff options
context:
space:
mode:
Diffstat (limited to 't/spore-response/body.t')
-rw-r--r--t/spore-response/body.t21
1 files changed, 17 insertions, 4 deletions
diff --git a/t/spore-response/body.t b/t/spore-response/body.t
index 2a35d6b..26c7baf 100644
--- a/t/spore-response/body.t
+++ b/t/spore-response/body.t
@@ -10,12 +10,25 @@ sub r($) {
return $res->finalize->[2];
}
+sub raw($) {
+ my $res = Net::HTTP::Spore::Response->new(200);
+ $res->raw_body(@_);
+ return $res->raw_body;
+}
+
+sub content($) {
+ my $res = Net::HTTP::Spore::Response->new(200);
+ $res->body(@_);
+ return $res->content;
+}
+
is_deeply r "Hello World", "Hello World";
is_deeply r [ "Hello", "World" ], [ "Hello", "World" ];
-{
- my $uri = URI->new("foo"); # stringified object
- is_deeply r $uri, $uri;
-}
+is_deeply raw "Hello World", "Hello World";
+is_deeply raw [ "Hello", "World" ], [ "Hello", "World" ];
+
+is_deeply content "Hello World", "Hello World";
+is_deeply content [ "Hello", "World" ], [ "Hello", "World" ];
done_testing;