File: ojo_signatures.t

package info (click to toggle)
libmojolicious-perl 8.71%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,996 kB
  • sloc: perl: 9,899; makefile: 31; javascript: 1
file content (20 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Mojo::Base -strict;

BEGIN {
  $ENV{MOJO_PROXY}   = 0;
  $ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll';
}

use Test::More;

BEGIN { plan skip_all => 'Perl 5.20+ required for this test!' if $] < 5.020 }

use ojo;

my $app = a('/' => sub ($c) { $_->render(data => 'signatures work') });
my $tx  = $app->ua->get('/');
ok !$tx->error, 'no error';
is $tx->res->code, 200,               'right status';
is $tx->res->body, 'signatures work', 'right content';

done_testing();