d7cc040ae59cd2744d43f37f5d8188832fd26e64
[catagits/Catalyst-Runtime.git] / t / 12default.t
1 package TestApp;
2
3 use Catalyst;
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 like( get('/foo')         , qr/bar/ );
27 like( get('/foo_bar/foo') , qr/yada/ );