BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; }
-use Test::More tests => 54*$iters;
+use Test::More tests => 57*$iters;
use Catalyst::Test 'TestApp';
if ( $ENV{CAT_BENCHMARK} ) {
$expected, 'Executed actions' );
is( $response->content, '1; 2', 'Content OK' );
}
+
+ #
+ # This is for testing if the arguments got passed to the actions
+ # correctly.
+ #
+ {
+ my @expected = qw[
+ TestApp::Controller::Action::ChildOf->begin
+ TestApp::Controller::Action::ChildOf::PassedArgs->first
+ TestApp::Controller::Action::ChildOf::PassedArgs->second
+ TestApp::Controller::Action::ChildOf::PassedArgs->third
+ TestApp::Controller::Action::ChildOf::PassedArgs->end
+ ];
+
+ my $expected = join( ", ", @expected );
+
+ ok( my $response = request('http://localhost/childof/passedargs/a/1/b/2/c/3'),
+ 'Correct arguments passed to actions' );
+ is( $response->header('X-Catalyst-Executed'),
+ $expected, 'Executed actions' );
+ is( $response->content, '1; 2; 3', 'Content OK' );
+ }
}