diff options
author | franck cuny <franck@lumberjaph.net> | 2010-11-03 18:48:44 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-11-03 18:48:44 +0100 |
commit | f06d9f0c07c5ae3fb19de9d4fd79d0462ddeaa5e (patch) | |
tree | 5088b93979f6f304481f19a574deab456c5af949 | |
parent | use new redirect port (diff) | |
download | net-http-spore-f06d9f0c07c5ae3fb19de9d4fd79d0462ddeaa5e.tar.gz |
add new test
-rw-r--r-- | t/spore-request/uri.t | 12 |
1 files changed, 11 insertions, 1 deletions
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}; |