fixed problems with mod_perl2
[catagits/Catalyst-Runtime.git] / t / 12default.t
1 package TestApp;
2
3 use Catalyst qw[-Engine=Test];
4
5 __PACKAGE__->action(
6     '!default' => sub {
7         my ( $self, $c ) = @_;
8         $c->res->output('bar');
9     }
10 );
11
12 package TestApp::C::Foo::Bar;
13
14 TestApp->action(
15     '!default' => sub {
16         my ( $self, $c ) = @_;
17         $c->res->output('yada');
18     }
19 );
20
21 package main;
22
23 use Test::More tests => 2;
24 use Catalyst::Test 'TestApp';
25
26 ok( get('/foo')         =~ /bar/ );
27 ok( get('/foo/bar/foo') =~ /yada/ );