File: env.t

package info (click to toggle)
libweb-simple-perl 0.033-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 380 kB
  • sloc: perl: 1,622; makefile: 7
file content (23 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings FATAL => 'all';

use Test::More 'no_plan';
use Plack::Test;

{
  use Web::Simple 'EnvTest';
  package EnvTest;
  sub dispatch_request  {
    sub (GET) {
      my $env = $_[PSGI_ENV];
      [ 200,
        [ "Content-type" => "text/plain" ],
        [ 'foo' ]
      ]
    },
  }
}

my $app = EnvTest->new;

ok $app->run_test_request(GET => 'http://localhost/')->is_success;