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