Merge pull request #7 from tokuhirom/master
[catagits/Web-Session.git] / t / 001_basic.t
CommitLineData
06190e8b 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More;
06190e8b 7
8use Plack::Request;
06190e8b 9use Plack::Session;
10use Plack::Session::State;
11use Plack::Session::Store;
12
f331b3e0 13use t::lib::TestSession;
14
15t::lib::TestSession::run_all_tests(
85265792 16 store => Plack::Session::Store->new,
17 state => Plack::Session::State->new,
18 env_cb => sub {
f331b3e0 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',
85265792 27 QUERY_STRING => join "&" => map { $_ . "=" . $_[0]->{ $_ } } keys %{$_[0] || +{}},
f331b3e0 28 };
f331b3e0 29 },
30);
06190e8b 31
fe1bfe7d 32done_testing;