From 3e3dc478fc9b4eb90681df89156dfcc8f7f81481 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Mon, 13 Sep 2010 13:31:56 +0200 Subject: initial import --- t/spore-response/response.t | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 t/spore-response/response.t (limited to 't/spore-response/response.t') diff --git a/t/spore-response/response.t b/t/spore-response/response.t new file mode 100644 index 0000000..56be6d2 --- /dev/null +++ b/t/spore-response/response.t @@ -0,0 +1,23 @@ +use strict; +use warnings; +use Test::More; +use Net::HTTP::Spore::Response; + +sub res { + my $res = Net::HTTP::Spore::Response->new; + my %v = @_; + while ( my ( $k, $v ) = each %v ) { + $res->$k($v); + } + $res->finalize; +} + +is_deeply( + res( + status => 200, + body => 'hello', + ), + [ 200, +[], 'hello' ] +); + +done_testing; -- cgit v1.2.3