X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_action.t;h=8dda2031c88e6e1571b21175ac84c646a8fe6ca7;hb=416771b3f7be55e0d19548350d6c8b9f4b5d950a;hp=1e11b186f4ccb21b6fe0e71c785d9eb20e84d7f2;hpb=5d8129e9b7bea385dd6fda9b490e7923f61eedd0;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_action.t b/t/aggregate/live_component_controller_action_action.t index 1e11b18..8dda203 100644 --- a/t/aggregate/live_component_controller_action_action.t +++ b/t/aggregate/live_component_controller_action_action.t @@ -10,7 +10,7 @@ our $iters; BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; } -use Test::More tests => 42 * $iters; +use Test::More; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -106,7 +106,7 @@ sub run_tests { 'Content is a serialized Catalyst::Request' ); } - + { ok( my $response = request('http://localhost/action_action_five'), 'Request' ); @@ -126,7 +126,6 @@ sub run_tests { 'Content is a serialized Catalyst::Request' ); } - { ok( my $response = request('http://localhost/action_action_six'), @@ -148,4 +147,25 @@ sub run_tests { ); } + { + ok( my $response = request('http://localhost/action_action_seven'), + 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ); + is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Catalyst-Action'), + 'action_action_seven', 'Test Action' ); + is( + $response->header('X-Test-Class'), + 'TestApp::Controller::Action::Action', + 'Test Class' + ); + is( $response->header('X-TestExtraArgsAction'), '42,23', 'Extra args get passed to action contstructor' ); + like( + $response->content, + qr/^bless\( .* 'Catalyst::Request' \)$/s, + 'Content is a serialized Catalyst::Request' + ); + } } + +done_testing;