From f06d9f0c07c5ae3fb19de9d4fd79d0462ddeaa5e Mon Sep 17 00:00:00 2001 From: franck cuny Date: Wed, 3 Nov 2010 18:48:44 +0100 Subject: add new test --- t/spore-request/uri.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 't/spore-request') diff --git a/t/spore-request/uri.t b/t/spore-request/uri.t index d3f8b82..c5b3bcb 100644 --- a/t/spore-request/uri.t +++ b/t/spore-request/uri.t @@ -92,6 +92,16 @@ my @tests = ( }, uri => 'http://example.com/foo%20bar/baz%20quux', parameters => {} + }, + { + add_env => { + HTTP_HOST => 'example.com', + SCRIPT_NAME => '', + PATH_INFO => '/:foo/:bar/:baz', + 'spore.params' => [qw/foo foo bar bar/] + }, + uri => 'http://example.com/foo/bar/', + parameters => { foo => 'foo', bar => 'bar' }, } ); @@ -102,7 +112,7 @@ for my $block (@tests) { while ( my ( $key, $val ) = each %{ $block->{add_env} || {} } ) { $env->{$key} = $val; } - my $req = Net::HTTP::Spore::Request->new($env); + my $req = Net::HTTP::Spore::Request->new($env)->finalize; is $req->uri, $block->{uri}; # is_deeply $req->query_parameters, $block->{parameters}; -- cgit 1.4.1