Skip to content

Commit

Permalink
better around_action tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 19, 2013
1 parent f72828f commit d75c25a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/mojolicious/dispatcher_lite_app.t
Expand Up @@ -89,7 +89,7 @@ plugin 'AroundPlugin';
# Pass argument to action
hook around_action => sub {
my ($next, $c, $action) = @_;
return $c->$action('works');
return $c->$action($c->current_route);
};

# Response generating condition "res" for /res.txt
Expand Down Expand Up @@ -117,7 +117,8 @@ get '/res.txt' => (res => 1) => sub {
# Allow rendering of return value
under '/' => {return => 1} => sub {1};

get sub { return pop };
# Return and render argument
get '/' => sub { return pop } => 'works';

my $t = Test::Mojo->new;

Expand Down

0 comments on commit d75c25a

Please sign in to comment.