adding in tests for the raw HASH session
[catagits/Web-Session.git] / t / 001a_basic.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use Plack::Request;
9 use Plack::Session::State;
10 use Plack::Session::Store;
11
12 use t::lib::TestSessionHash;
13
14 t::lib::TestSessionHash::run_all_tests(
15     store  => Plack::Session::Store->new,
16     state  => Plack::Session::State->new,
17     env_cb => sub {
18         open my $in, '<', \do { my $d };
19         my $env = {
20             'psgi.version'    => [ 1, 0 ],
21             'psgi.input'      => $in,
22             'psgi.errors'     => *STDERR,
23             'psgi.url_scheme' => 'http',
24             SERVER_PORT       => 80,
25             REQUEST_METHOD    => 'GET',
26             QUERY_STRING      => join "&" => map { $_ . "=" . $_[0]->{ $_ } } keys %{$_[0] || +{}},
27         };
28     },
29 );
30
31 done_testing;