X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flive_component_controller_action_local.t;h=51771635f152c89fec6d475cdbba5fccf8e86f9c;hp=62c2674633fbdca29262aad9508bc3b3ddfcb13c;hb=4082e67814e85bc9820e56eb38e5e21511c0a5f8;hpb=855ed93153e2b0c0e88d9bb8f23822c914393048 diff --git a/t/live_component_controller_action_local.t b/t/live_component_controller_action_local.t index 62c2674..5177163 100644 --- a/t/live_component_controller_action_local.t +++ b/t/live_component_controller_action_local.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } -use Test::More tests => 30*$iters; +use Test::More tests => 32*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -44,7 +44,7 @@ sub run_tests { } { - ok( my $response = request('http://localhost/action/local/two'), + ok( my $response = request('http://localhost/action/local/two/1/2'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); @@ -63,6 +63,12 @@ sub run_tests { } { + ok( my $response = request('http://localhost/action/local/two'), + 'Request' ); + ok( !$response->is_success, 'Request with wrong number of args failed' ); + } + + { ok( my $response = request('http://localhost/action/local/three'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); @@ -106,13 +112,13 @@ sub run_tests { { ok( my $response = - request('http://localhost/action/local/two/foo%2Fbar'), + request('http://localhost/action/local/one/foo%2Fbar'), 'Request' ); ok( $response->is_success, 'Response Successful 2xx' ); is( $response->content_type, 'text/plain', 'Response Content-Type' ); is( $response->header('X-Catalyst-Action'), - 'action/local/two', 'Test Action' ); + 'action/local/one', 'Test Action' ); is( $response->header('X-Test-Class'), 'TestApp::Controller::Action::Local',