BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
-use Test::More tests => 138*$iters;
+use Test::More tests => 141*$iters;
use Catalyst::Test 'TestApp';
if ( $ENV{CAT_BENCHMARK} ) {
# Test if :Chained('../act') is working
#
{
- local $TODO = "To Be Coded";
my @expected = qw[
TestApp::Controller::Action::Chained->begin
- TestApp::Controller::Action::Chained->rootdef
+ TestApp::Controller::Action::Chained->one
TestApp::Controller::Action::Chained::ParentChain->chained_rel
TestApp::Controller::Action::Chained->end
];
my $expected = join( ", ", @expected );
- ok( my $response = request('http://localhost/chained/rootdef/1/chained_rel/3/2'),
+ ok( my $response = request('http://localhost/chained/one/1/chained_rel/3/2'),
":Chained('../action') chains to correct action" );
is( $response->header('X-Catalyst-Executed'),
$expected, 'Executed actions' );
}
#
+ # Test if ../ works to go up more than one level
+ #
+ {
+ my @expected = qw[
+ TestApp::Controller::Action::Chained->begin
+ TestApp::Controller::Action::Chained->one
+ TestApp::Controller::Action::Chained::ParentChain::Relative->chained_rel_two
+ TestApp::Controller::Action::Chained->end
+ ];
+
+ my $expected = join( ", ", @expected );
+
+ ok( my $response = request('http://localhost/chained/one/1/chained_rel_two/42/23'),
+ "../ works to go up more than one level" );
+ is( $response->header('X-Catalyst-Executed'),
+ $expected, 'Executed actions' );
+ is( $response->content, '1; 42, 23', 'Content OK' );
+ }
+
+ #
# Test if :ChainedParent is working
#
{
- local $TODO = "To Be Coded";
my @expected = qw[
TestApp::Controller::Action::Chained->begin
TestApp::Controller::Action::Chained->loose
# Test if :Chained('../name/act') is working
#
{
- local $TODO = "To Be Coded";
my @expected = qw[
TestApp::Controller::Action::Chained->begin
TestApp::Controller::Action::Chained::Bar->cross1