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