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