Commit | Line | Data |
7ffc9d9d |
1 | #!perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use FindBin; |
7 | use lib "$FindBin::Bin/lib"; |
8 | |
9 | use Test::More tests => 3; |
10 | |
11 | |
12 | use TestApp; |
13 | |
14 | my $dispatch_type = TestApp->dispatcher->dispatch_type('Chained'); |
15 | isa_ok($dispatch_type, "Catalyst::DispatchType::Chained", "got dispatch type"); |
16 | |
17 | # This test was failing due to recursion/OOM. set up an alarm so things dont |
18 | # runaway |
19 | local $SIG{ALRM} = sub { |
20 | ok(0, "Chained->list didn't loop"); |
21 | die "alarm expired - test probably looping"; |
22 | }; |
23 | alarm 10; |
24 | |
25 | $dispatch_type->list("TestApp"); |
26 | ok(1, "Chained->list didn't loop"); |