added Test::Pod support
[catagits/Catalyst-Runtime.git] / t / 12stash.t
CommitLineData
fc7ec1d9 1package TestApp;
2
e05c5e3c 3use Catalyst qw[-Engine=Test];
fc7ec1d9 4
5__PACKAGE__->action(
6 foo => sub {
7 my ( $self, $c ) = @_;
8 $c->stash->{test} ||= 'foo';
9 $c->forward('bar');
10 },
11 bar => sub {
12 my ( $self, $c ) = @_;
13 $c->stash->{test} ||= 'bar';
14 $c->forward('yada');
15 },
16 yada => sub {
17 my ( $self, $c ) = @_;
18 $c->stash->{test} ||= 'yada';
19 $c->res->output( $c->stash->{test} );
20 }
21);
22
23package main;
24
25use Test::More tests => 2;
26use Catalyst::Test 'TestApp';
27
28ok( get('/foo') =~ /foo/ );
29ok( get('/bar') =~ /bar/ );