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' );
#sub execute { return shift->NEXT::execute(@_); } # does not work, bug?
+sub main_action : Private {
+ my ( $self, $c ) = @_;
+ $c->forward('TestApp::View::Dump::Request');
+}
+
sub execute {
my $c = shift;
my $class = ref( $c->component($_[0]) ) || $_[0];