7 # This test needs to be rewritten (and the code it was using as well) since
8 # when we added the arg and capturearg type constraint support, we now allow
9 # non integer values. however we could probably support some additional sanity
10 # testing on the values, so this is a nice TODO for someone -jnap
12 plan skip_all => 'Removing this test because constraint arg types allow this';
14 use Catalyst::Test 'TestApp';
22 for my $type (qw(Args CaptureArgs)) {
24 package TestApp::Controller::Action::Chained;
25 no warnings 'redefine';
26 sub should_fail : Chained('/') ${type}${fail} {}
30 eval { TestApp->setup_actions };
31 like($@, qr/Invalid \Q${type}${fail}\E/,
32 "Bad ${type}${fail} attribute makes action setup fail");
43 for my $type (qw(Args CaptureArgs)) {
45 package TestApp::Controller::Action::Chained;
46 no warnings 'redefine';
47 sub should_fail : Chained('/') ${type}${ok} {}
50 eval { TestApp->setup_actions };
51 ok(!$@, "${type}${ok} works");
55 for my $first (qw(Args CaptureArgs)) {
56 for my $second (qw(Args CaptureArgs)) {
58 package TestApp::Controller::Action::Chained;
59 no warnings 'redefine';
60 sub should_fail :Chained('/') $first $second {}
63 eval { TestApp->setup_actions };
64 my $msg = $first eq $second
66 : "Combining Args and CaptureArgs";
67 like($@, qr/$msg attributes not supported registering/,
68 "$first + $second attribute makes action setup fail");