Enable hooking parameters into req/res construction. Useful if you are dynamically...
[catagits/Catalyst-Runtime.git] / t / dead_load_multiple_chained_attributes.t
CommitLineData
2f381252 1#!perl
2
3use strict;
4use warnings;
5use lib 't/lib';
6
7use Test::More;
8
9plan tests => 4;
10
11use Catalyst::Test 'TestApp';
12
13c6b4cc 13eval q{
2f381252 14 package TestApp::Controller::Action::Chained;
15 sub should_fail : Chained('/') Chained('foo') Args(0) {}
16};
17ok(!$@);
18
13c6b4cc 19eval { TestApp->setup_actions; };
2f381252 20ok($@, 'Multiple chained attributes make action setup fail');
21
13c6b4cc 22eval q{
2f381252 23 package TestApp::Controller::Action::Chained;
24 no warnings 'redefine';
25 sub should_fail {}
26};
27ok(!$@);
28
29eval { TestApp->setup_actions };
30ok(!$@, 'And ok again') or warn $@;
31