added tests for forward to global private actions.
[catagits/Catalyst-Runtime.git] / t / component / controller / action / forward.t
index 273d00f..a031eee 100644 (file)
@@ -23,7 +23,13 @@ use Catalyst::Test 'TestApp';
 
     my $expected = join( ", ", @expected );
 
-    ok( my $response = request('http://localhost/action/forward/one'), 'Request' );
+   # Test forward to global private action
+    ok( my $response = request('http://localhost/main_action'), 'Request' );
+    ok( $response->is_success, 'Response Successful 2xx' );
+    is( $response->content_type, 'text/plain', 'Response Content-Type' );
+    is( $response->header('X-Catalyst-Action'), 'main_action', 'Main Class Action' );
+    # Test forward to chain of actions.
+    ok( $response = request('http://localhost/action/forward/one'), 'Request' );
     ok( $response->is_success, 'Response Successful 2xx' );
     is( $response->content_type, 'text/plain', 'Response Content-Type' );
     is( $response->header('X-Catalyst-Action'), 'action/forward/one', 'Test Action' );