Merge pull request #7 from tokuhirom/master
[catagits/Web-Session.git] / t / 005_basic_w_cache_store.t
old mode 100644 (file)
new mode 100755 (executable)
index ebd1f80..3cb9b24
@@ -39,9 +39,9 @@ use t::lib::TestSession;
 }
 
 t::lib::TestSession::run_all_tests(
-    store           => Plack::Session::Store::Cache->new( cache => TestCache->new ),
-    state           => Plack::Session::State->new,
-    request_creator => sub {
+    store  => Plack::Session::Store::Cache->new( cache => TestCache->new ),
+    state  => Plack::Session::State->new,
+    env_cb => sub {
         open my $in, '<', \do { my $d };
         my $env = {
             'psgi.version'    => [ 1, 0 ],
@@ -50,10 +50,8 @@ t::lib::TestSession::run_all_tests(
             'psgi.url_scheme' => 'http',
             SERVER_PORT       => 80,
             REQUEST_METHOD    => 'GET',
+            QUERY_STRING      => join "&" => map { $_ . "=" . $_[0]->{ $_ } } keys %{$_[0] || +{}},
         };
-        my $r = Plack::Request->new( $env );
-        $r->parameters( @_ );
-        $r;
     },
 );