Commit | Line | Data |
57d7305c |
1 | #!perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | use lib 't/lib'; |
6 | |
7 | use Test::More; |
8 | |
9 | plan tests => 4; |
10 | |
11 | use Catalyst::Test 'TestApp'; |
12 | |
13 | eval q{ |
14 | package TestApp::Controller::Action::Chained; |
15 | sub should_fail : Chained('/') Chained('foo') Args(0) {} |
16 | }; |
17 | ok(!$@); |
18 | |
19 | eval { TestApp->setup_actions; }; |
20 | ok($@, 'Multiple chained attributes make action setup fail'); |
21 | |
22 | eval q{ |
23 | package TestApp::Controller::Action::Chained; |
24 | no warnings 'redefine'; |
25 | sub should_fail {} |
26 | }; |
27 | ok(!$@); |
28 | |
29 | eval { TestApp->setup_actions }; |
30 | ok(!$@, 'And ok again') or warn $@; |
31 | |