9 use Catalyst::Test 'TestApp';
16 for my $type (qw(Args CaptureArgs)) {
18 package TestApp::Controller::Action::Chained;
19 no warnings 'redefine';
20 sub should_fail : Chained('/') ${type}${fail} {}
24 eval { TestApp->setup_actions };
25 like($@, qr/Invalid \Q${type}${fail}\E/,
26 "Bad ${type}${fail} attribute makes action setup fail");
37 for my $type (qw(Args CaptureArgs)) {
39 package TestApp::Controller::Action::Chained;
40 no warnings 'redefine';
41 sub should_fail : Chained('/') ${type}${ok} {}
44 eval { TestApp->setup_actions };
45 ok(!$@, "${type}${ok} works");
49 for my $first (qw(Args CaptureArgs)) {
50 for my $second (qw(Args CaptureArgs)) {
52 package TestApp::Controller::Action::Chained;
53 no warnings 'redefine';
54 sub should_fail :Chained('/') $first $second {}
57 eval { TestApp->setup_actions };
58 my $msg = $first eq $second
60 : "Combining Args and CaptureArgs";
61 like($@, qr/$msg attributes not supported registering/,
62 "$first + $second attribute makes action setup fail");