X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_path.t;h=1f8541db2a0c5f65210bbae2740bbb05c3432f06;hp=338e696605655b6702b625a0f117169153459989;hb=82010ea176741c7a4f2baf3f6f27377b1d9f6b15;hpb=ae29b412955743885e80350085167b54b69672da diff --git a/t/aggregate/live_component_controller_action_path.t b/t/aggregate/live_component_controller_action_path.t index 338e696..1f8541d 100644 --- a/t/aggregate/live_component_controller_action_path.t +++ b/t/aggregate/live_component_controller_action_path.t @@ -1,5 +1,3 @@ -#!perl - use strict; use warnings; @@ -10,7 +8,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 36*$iters; +use Test::More tests => 42*$iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -142,4 +140,22 @@ sub run_tests { 'Content is a serialized Catalyst::Request' ); } + + { + ok( my $response = request('http://localhost/action/path/six'), 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Catalyst-Action'), + 'action/path/six', 'Test Action' ); + is( + $response->header('X-Test-Class'), + 'TestApp::Controller::Action::Path', + 'Test Class' + ); + like( + $response->content, + qr/^bless\( .* 'Catalyst::Request' \)$/s, + 'Content is a serialized Catalyst::Request' + ); + } }