Release commit for 0.031
[catagits/Web-Simple.git] / t / env.t
1 use strict;
2 use warnings FATAL => 'all';
3
4 use Test::More 'no_plan';
5 use Plack::Test;
6
7 {
8   use Web::Simple 'EnvTest';
9   package EnvTest;
10   sub dispatch_request  {
11     sub (GET) {
12       my $env = $_[PSGI_ENV];
13       [ 200,
14         [ "Content-type" => "text/plain" ],
15         [ 'foo' ]
16       ]
17     },
18   }
19 }
20
21 my $app = EnvTest->new;
22
23 ok $app->run_test_request(GET => 'http://localhost/')->is_success;