X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive_component_controller_action_forward.t;h=2479fb6b17b3756a3f5f35605b6bea3f9b86ba2f;hb=92f9d3ad4cba9d517c9819c136b4115e917dc46b;hp=f05fc2d7c19441675bbd3a56bd75a4e899695016;hpb=b63f73dceef82d19bb95fef2d9ad5bbc2911b595;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live_component_controller_action_forward.t b/t/live_component_controller_action_forward.t index f05fc2d..2479fb6 100644 --- a/t/live_component_controller_action_forward.t +++ b/t/live_component_controller_action_forward.t @@ -10,7 +10,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} ) { @@ -242,9 +242,18 @@ sub run_tests { 'forward_to_uri_check request'); ok( $response->is_success, 'forward_to_uri_check successful'); - # optional port, as it could be a live test - like( $response->content, qr{http://localhost(:\d+)?/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'); + } }