check wrong format request session_id
[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');
40cc4851 17if ( !-d $TMP ) {
18 mkdir $TMP;
19}
f331b3e0 20
21t::lib::TestSession::run_all_tests(
22 store => Plack::Session::Store::File->new( dir => $TMP ),
23 state => Plack::Session::State->new,
24 request_creator => sub {
25 open my $in, '<', \do { my $d };
26 my $env = {
27 'psgi.version' => [ 1, 0 ],
28 'psgi.input' => $in,
29 'psgi.errors' => *STDERR,
30 'psgi.url_scheme' => 'http',
31 SERVER_PORT => 80,
32 REQUEST_METHOD => 'GET',
33 };
34 my $r = Plack::Request->new( $env );
35 $r->parameters( @_ );
36 $r;
37 },
38);
39
56b9910a 40#unlink $_ foreach glob( File::Spec->catdir($TMP, '*') );
f331b3e0 41
42done_testing;