diff options
author | franck cuny <franck@lumberjaph.net> | 2010-09-15 16:14:40 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-09-15 16:14:40 +0200 |
commit | 606b117f2c5246eafd5b2001fd211d79aba85447 (patch) | |
tree | 1fe59eafe8690d30404437376d429e813ace8a26 /t/spore-response | |
parent | add a auth method (diff) | |
download | net-http-spore-606b117f2c5246eafd5b2001fd211d79aba85447.tar.gz |
update tests
Diffstat (limited to '')
-rw-r--r-- | t/spore-response/body.t | 21 |
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; |