support get_dbh callback
[catagits/Web-Session.git] / t / 006_basic_w_dbi_store.t
index 7d5b384..2b7b03d 100644 (file)
@@ -42,6 +42,24 @@ t::lib::TestSession::run_all_tests(
     },
 );
 
+t::lib::TestSession::run_all_tests(
+    store  => Plack::Session::Store::DBI->new( get_dbh => sub { $dbh }  ),
+    state  => Plack::Session::State->new,
+    env_cb => sub {
+        open my $in, '<', \do { my $d };
+        my $env = {
+            'psgi.version'    => [ 1, 0 ],
+            'psgi.input'      => $in,
+            'psgi.errors'     => *STDERR,
+            'psgi.url_scheme' => 'http',
+            SERVER_PORT       => 80,
+            REQUEST_METHOD    => 'GET',
+            QUERY_STRING      => join "&" => map { $_ . "=" . $_[0]->{ $_ } } keys %{$_[0] || +{}},
+        };
+    },
+);
+
+
 $dbh->disconnect;
 
-done_testing;
\ No newline at end of file
+done_testing;