summary refs log tree commit diff
path: root/t/spore-response
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-09-15 16:14:40 +0200
committerfranck cuny <franck@lumberjaph.net>2010-09-15 16:14:40 +0200
commit606b117f2c5246eafd5b2001fd211d79aba85447 (patch)
tree1fe59eafe8690d30404437376d429e813ace8a26 /t/spore-response
parentadd a auth method (diff)
downloadnet-http-spore-606b117f2c5246eafd5b2001fd211d79aba85447.tar.gz
update tests
Diffstat (limited to 't/spore-response')
-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;