From: Rafael Kitover Date: Thu, 18 Jun 2009 21:38:40 +0000 (+0000) Subject: made a failing test X-Git-Tag: 5.80006~47 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=2ee0056ea3edb67a476aadeac450afdb3a5286d8 made a failing test --- diff --git a/t/aggregate/live_component_controller_action_index_or_default_names.t b/t/aggregate/live_component_controller_action_index_or_default_names.t new file mode 100644 index 0000000..e5889bb --- /dev/null +++ b/t/aggregate/live_component_controller_action_index_or_default_names.t @@ -0,0 +1,29 @@ +#!perl + +use strict; +use warnings; + +use FindBin; +use lib "$FindBin::Bin/../lib"; + +our $iters; + +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } + +use Test::More tests => 1*$iters; + +use Catalyst::Test 'TestAppIndexDefault'; + +if ( $ENV{CAT_BENCHMARK} ) { + require Benchmark; + Benchmark::timethis( $iters, \&run_tests ); +} +else { + for ( 1 .. $iters ) { + run_tests(); + } +} + +sub run_tests { + is(get('/indexchained'), 'index_chained', ':Chained overrides index'); +} diff --git a/t/lib/TestAppIndexDefault.pm b/t/lib/TestAppIndexDefault.pm new file mode 100644 index 0000000..9a129cb --- /dev/null +++ b/t/lib/TestAppIndexDefault.pm @@ -0,0 +1,8 @@ +package TestAppIndexDefault; +use strict; +use warnings; +use Catalyst; + +__PACKAGE__->setup; + +1; diff --git a/t/lib/TestAppIndexDefault/Controller/IndexChained.pm b/t/lib/TestAppIndexDefault/Controller/IndexChained.pm new file mode 100644 index 0000000..18a8034 --- /dev/null +++ b/t/lib/TestAppIndexDefault/Controller/IndexChained.pm @@ -0,0 +1,12 @@ +package TestAppIndexDefault::Controller::IndexChained; + +use base 'Catalyst::Controller'; + +sub index : Chained('/') PathPart('indexchained') CaptureArgs(0) {} + +sub index_endpoint : Chained('index') PathPart('') Args(0) { + my ($self, $c) = @_; + $c->res->body('index_chained'); +} + +1;