Skip to content

Commit

Permalink
more tests for non-blocking operations in bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 29, 2013
1 parent fd14a7b commit 65c2e51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/mojolicious/group_lite_app.t
Expand Up @@ -191,8 +191,13 @@ $t->reset_session;
$t->get_ok('/missing')->status_is(404)->content_is("Oops!\n");

# Suspended bridge
my $log = '';
my $cb = $t->ua->app->log->on(message => sub { $log .= pop });
$t->get_ok('/suspended?ok=1')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')->content_is('suspended!');
like $log, qr/Nothing has been rendered, expecting delayed response./,
'right message';
$t->ua->app->log->unsubscribe(message => $cb);

# Suspended bridge (stopped)
$t->get_ok('/suspended?ok=0')->status_is(200)
Expand Down

0 comments on commit 65c2e51

Please sign in to comment.