sub _invoke_as_component {
my ( $self, $c, $component, $method ) = @_;
+ #FIXME - Is this resolving needed/should it just return the instance
+ # directly
my $class = $self->_find_component_class( $c, $component ) || return 0;
+ my $component_instance = $c->component($class);
if (my $code = $component_instance->can('action_for')) {
my $possible_action = $component_instance->$code($method);
return $possible_action if $possible_action;
);
ok( !$response->is_success, 'Response Fails' );
is( $response->content,
- q(FATAL ERROR: Couldn't go("TestApp"): Action has no namespace: cannot go() to a plain method or component, must be a :Action or some sort.),
+ q(FATAL ERROR: Couldn't go("TestApp"): Action has no namespace: cannot go() to a plain method or component, must be an :Action of some sort.),
'Error message'
);
}
$c->response->headers->header( 'X-Class-Forward-Test-Method' => 1 );
}
-sub class_go_test_method :Private {
- my ( $self, $c ) = @_;
- $c->response->headers->header( 'X-Class-Go-Test-Method' => 1 );
-}
-
-sub class_visit_test_method :Private {
- my ( $self, $c ) = @_;
- $c->response->headers->header( 'X-Class-Visit-Test-Method' => 1 );
-}
-
sub loop_test : Local {
my ( $self, $c ) = @_;
sub class_go_test_action : Local {
my ( $self, $c ) = @_;
- $c->go(qw/TestApp class_go_test_method/);
+ $c->go(qw/TestApp/);
}
1;