X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_component_controller_action_forward.t;h=5d4a8d0e7e7ad0959a19eba1d9e3d546c25b71a2;hb=6ca3b7de88bc467ca828496a614d84dc3a9a2b51;hp=750c067d1c615a1c6aa5ecc4b8bb8c6d4ff7ced2;hpb=42da66a91b0a87ebb81d8552bcd0b05d3557c83e;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_component_controller_action_forward.t b/t/aggregate/live_component_controller_action_forward.t index 750c067..5d4a8d0 100644 --- a/t/aggregate/live_component_controller_action_forward.t +++ b/t/aggregate/live_component_controller_action_forward.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 => 50 * $iters; +use Test::More tests => 53 * $iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -33,7 +31,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -81,7 +79,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -156,7 +154,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -191,7 +189,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -242,7 +240,18 @@ sub run_tests { 'forward_to_uri_check request'); ok( $response->is_success, 'forward_to_uri_check successful'); - is( $response->content, '/action/forward/foo/bar', + is( $response->content, 'action/forward/foo/bar', 'forward_to_uri_check correct namespace'); } + + # test forwarding to Catalyst::Action objects + { + ok( my $response = request( + 'http://localhost/action/forward/to_action_object'), + 'forward/to_action_object request'); + + ok( $response->is_success, 'forward/to_action_object successful'); + is( $response->content, 'mtfnpy', + 'forward/to_action_object forwards correctly'); + } }