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=26dd6d9f6575fe782e78d6845fff3447e5ba5744;hp=7b1d0cffe078965ace62677bd8c578f5aa958fd2;hpb=6b25e5554ead493893b5bf164bfde1f58f0730e5;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_component_controller_action_path.t b/t/live_component_controller_action_path.t index 7b1d0cf..18fc83d 100644 --- a/t/live_component_controller_action_path.t +++ b/t/live_component_controller_action_path.t @@ -10,7 +10,7 @@ our $iters; 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' + ); + } }