summary refs log tree commit diff
path: root/t/spore-request
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-11-03 18:48:44 +0100
committerfranck cuny <franck@lumberjaph.net>2010-11-03 18:48:44 +0100
commitf06d9f0c07c5ae3fb19de9d4fd79d0462ddeaa5e (patch)
tree5088b93979f6f304481f19a574deab456c5af949 /t/spore-request
parentuse new redirect port (diff)
downloadnet-http-spore-f06d9f0c07c5ae3fb19de9d4fd79d0462ddeaa5e.tar.gz
add new test
Diffstat (limited to 't/spore-request')
-rw-r--r--t/spore-request/uri.t12
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};