14 lines
415 B
Perl
14 lines
415 B
Perl
use Mojo::Base -strict;
|
|
|
|
use Test2::V0;
|
|
use Test2::Plugin::BailOnFail;
|
|
use Test::Mojo;
|
|
|
|
my $t = Test::Mojo->new('MyApp');
|
|
$t->get_ok('/')->status_is(200)->content_like(qr/Books/);
|
|
$t->get_ok('/about')->status_is(200)->content_like(qr/about/i);
|
|
$t->get_ok('/1')->status_is(200)->content_like(qr/[[:digit:]] books/i);
|
|
$t->get_ok('/authors/1')->status_is(200)->content_like(qr/[[:digit:]] authors/i);
|
|
|
|
done_testing();
|