934c058916d3bf2a5e4a9b10c1aa83427506a86a
[catagits/Catalyst-Runtime.git] / t / 09forward.t
1 package TestApp;
2
3 use Catalyst qw[-Engine=Test];
4
5 __PACKAGE__->action(
6     foo => sub {
7         my ( $self, $c ) = @_;
8         $c->forward('bar');
9     },
10     bar => sub {
11         my ( $self, $c, $arg ) = @_;
12         $c->res->output($arg);
13     }
14 );
15
16 package main;
17
18 use Test::More tests => 1;
19 use Catalyst::Test 'TestApp';
20
21 ok( get('/foo/bar') =~ /bar/ );