BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
-use Test::More tests => 54 * $iters;
+use Test::More tests => 60 * $iters;
use Catalyst::Test 'TestApp';
if ( $ENV{CAT_BENCHMARK} ) {
);
ok( !$response->is_success, 'Response Fails' );
is( $response->content,
- q[FATAL ERROR: Couldn't visit("TestApp"): Action has no namespace: cannot visit() to a plain method or component, must be a :Action or some sort.],
+ q{FATAL ERROR: Couldn't visit("TestApp"): Action has no namespace: cannot visit() to a plain method or component, must be an :Action of some sort.},
"Cannot visit app namespace"
);
}
my $expected = join( ", ", @expected );
- ok( my $response = request('http://localhost/action/visit/visit_chained'), 'visit to chained + subcontroller endpoint' );
- is( $response->header('X-Catalyst-Executed'),
- $expected, 'Executed actions' );
- is( $response->content, '; 1', 'Content OK' );
+ for my $i ( 1..3 ) {
+ ok( my $response = request("http://localhost/action/visit/visit_chained/$i/becomescapture/arg1/arg2"),
+ "visit to chained + subcontroller endpoint for $i" );
+ is( $response->header('X-Catalyst-Executed'),
+ $expected, "Executed actions for $i" );
+ is( $response->content, "arg1, arg2; becomescapture",
+ "Content OK for $i" );
+ }
}
}