Skip to content

Instantly share code, notes, and snippets.

@KES777
Last active November 2, 2017 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KES777/6ca7b3f43e18f1935ef7f7a6d5ab02f7 to your computer and use it in GitHub Desktop.
Save KES777/6ca7b3f43e18f1935ef7f7a6d5ab02f7 to your computer and use it in GitHub Desktop.
# BEGIN{ $ENV{MOJO_INACTIVITY_TIMEOUT} = 0; }
use Mojolicious::Lite;
package DeepApp;
use Mojolicious::Lite;
get '/test' => sub {
my $c = shift;
$c->render( text => 'OK' );
};
package main;
use Test::More;
use Test::Mojo;
my $r = app->routes;
$r->any('/first')->detour( 'DeepApp' );
my $t = Test::Mojo->new;
$t->get_ok('/first/test')
->content_is( "OK" );
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment