Fix the way Catalyst::Plugin::Server adds custom dispatch types
[catagits/Catalyst-Runtime.git] / t / lib / TestApp.pm
index a46ecb1..058084f 100644 (file)
@@ -7,6 +7,7 @@ use Catalyst qw/
     Test::Plugin
     Test::Inline
     +TestApp::Plugin::FullyQualified
+    +TestApp::Plugin::AddDispatchTypes
 /;
 use Catalyst::Utils;
 
@@ -61,7 +62,7 @@ sub execute {
 sub finalize_error {
     my $c = shift;
     
-    $c->NEXT::finalize_error(@_);
+    $c->next::method(@_);
     
     $c->res->status(500);
     $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
@@ -72,6 +73,16 @@ sub class_forward_test_method :Private {
     $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 ) = @_;