Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 36 lines (28 sloc) 0.522 kB
496ab70 in one file
Zbigniew Lukasiak authored
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Plack::Test;
6 use HTTP::Request::Common;
7
8 test_psgi(
b4b804a psgi_callback to psgi_app
Zbigniew Lukasiak authored
9 app => MyApp->new()->psgi_app,
496ab70 in one file
Zbigniew Lukasiak authored
10 client => sub {
11 my $cb = shift;
12 my $res = $cb->(GET "/");
13 is( $res->content, 'This is my home' );
14 }
15 );
16
17 done_testing;
18
19 {
20 package MyApp;
21 use base 'WebNano';
55f8404 fixed one-file app
Zbigniew Lukasiak authored
22 1;
496ab70 in one file
Zbigniew Lukasiak authored
23 }
24
25 {
26 package MyApp::Controller;
27 use base 'WebNano::Controller';
28
29 sub index_action {
30 my $self = shift;
31 return 'This is my home';
32 }
55f8404 fixed one-file app
Zbigniew Lukasiak authored
33 1;
496ab70 in one file
Zbigniew Lukasiak authored
34 }
35
Something went wrong with that request. Please try again.