X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_component_controller_action_path.t;h=18fc83d6b0fcc30261ff5ed31772bbd9a93bb79c;hb=92f9d3ad4cba9d517c9819c136b4115e917dc46b;hp=96a52cb59d1d8506dcf0d84f0e7229ff2d86b7b4;hpb=595f3872331fe9d3b2fc22a18a7e03abc1e69d42;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_component_controller_action_path.t b/t/live_component_controller_action_path.t index 96a52cb..18fc83d 100644 --- a/t/live_component_controller_action_path.t +++ b/t/live_component_controller_action_path.t @@ -8,9 +8,9 @@ use lib "$FindBin::Bin/lib"; our $iters; -BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; } +BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 30*$iters; +use Test::More tests => 36*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -124,4 +124,22 @@ sub run_tests { 'Content is a serialized Catalyst::Request' ); } + + { + ok( my $response = request('http://localhost/0'), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Catalyst-Action'), + '0', 'Test Action' ); + is( + $response->header('X-Test-Class'), + 'TestApp::Controller::Root', + 'Test Class' + ); + like( + $response->content, + qr/^bless\( .* 'Catalyst::Request' \)$/s, + 'Content is a serialized Catalyst::Request' + ); + } }