9 use Catalyst::Test 'TestApp';
17 for my $type (qw(Args CaptureArgs)) {
19 package TestApp::Controller::Action::Chained;
20 no warnings 'redefine';
21 sub should_fail : Chained('/') ${type}${fail} {}
25 eval { TestApp->setup_actions };
26 like($@, qr/Invalid \Q${type}${fail}\E/,
27 "Bad ${type}${fail} attribute makes action setup fail");
38 for my $type (qw(Args CaptureArgs)) {
40 package TestApp::Controller::Action::Chained;
41 no warnings 'redefine';
42 sub should_fail : Chained('/') ${type}${ok} {}
45 eval { TestApp->setup_actions };
46 ok(!$@, "${type}${ok} works");
50 for my $first (qw(Args CaptureArgs)) {
51 for my $second (qw(Args CaptureArgs)) {
53 package TestApp::Controller::Action::Chained;
54 no warnings 'redefine';
55 sub should_fail :Chained('/') $first $second {}
58 eval { TestApp->setup_actions };
59 my $msg = $first eq $second
61 : "Combining Args and CaptureArgs";
62 like($@, qr/$msg attributes not supported registering/,
63 "$first + $second attribute makes action setup fail");