Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use strict;
- use warnings;
- use Test::More qw/no_plan/;
- use Test::Mojo;
- use FindBin;
- use lib "$FindBin::Bin/../lib";
- use_ok('MyMojoliciousApp');
- # Test
- my $t = Test::Mojo->new(app => 'MyMojoliciousApp');
- $t->get_ok('/answer')->status_is(200)->content_type_is('text/html')
- ->content_like(qr/take over the world!/i, 'got responce');
- my $t = Test::Mojo->new(app => 'MyMojoliciousApp');
- $t->get_ok('/question')->status_is(200)->content_type_is('text/html')
- ->content_like(qr/take over the world!/i, 'got async responce');
Add Comment
Please, Sign In to add comment