add test for Store::CHI
[catagits/Web-Session.git] / t / 005_basic_w_chi_store.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use Test::Requires 'CHI';
6
7 use Test::More;
8
9 use Plack::Request;
10 use Plack::Session;
11 use Plack::Session::State;
12 use Plack::Session::Store::CHI;
13
14 use t::lib::TestSession;
15
16 t::lib::TestSession::run_all_tests(
17     store           => Plack::Session::Store::CHI->new( chi => CHI->new(driver => 'Memory', datastore => {}) ),
18     state           => Plack::Session::State->new,
19     request_creator => sub {
20         open my $in, '<', \do { my $d };
21         my $env = {
22             'psgi.version'    => [ 1, 0 ],
23             'psgi.input'      => $in,
24             'psgi.errors'     => *STDERR,
25             'psgi.url_scheme' => 'http',
26             SERVER_PORT       => 80,
27             REQUEST_METHOD    => 'GET',
28         };
29         my $r = Plack::Request->new( $env );
30         $r->parameters( @_ );
31         $r;
32     },
33 );
34
35
36 done_testing;