re-usable test suite and Store::File added
[catagits/Web-Session.git] / t / 001_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;
10 use Plack::Session::State;
11 use Plack::Session::Store;
12
13 use t::lib::TestSession;
14
15 t::lib::TestSession::run_all_tests(
16     store           => Plack::Session::Store->new,
17     state           => Plack::Session::State->new,
18     request_creator => sub {
19         open my $in, '<', \do { my $d };
20         my $env = {
21             'psgi.version'    => [ 1, 0 ],
22             'psgi.input'      => $in,
23             'psgi.errors'     => *STDERR,
24             'psgi.url_scheme' => 'http',
25             SERVER_PORT       => 80,
26             REQUEST_METHOD    => 'GET',
27         };
28         my $r = Plack::Request->new( $env );
29         $r->parameters( @_ );
30         $r;
31     },
32 );
33
34 done_testing;