fixed test app for t/aggregate/custom_live_component_controller_action_auto_doublebug.t
Zbigniew Łukasiak [Tue, 17 Nov 2009 14:59:57 +0000 (14:59 +0000)]
t/lib/TestAppDoubleAutoBug.pm

index 524ed8b..cc9e6b8 100644 (file)
@@ -9,41 +9,13 @@ use Catalyst qw/
     Test::Plugin
 /;
 
+use TestApp::Context;
+
 our $VERSION = '0.01';
 
 __PACKAGE__->config( name => 'TestAppDoubleAutoBug', root => '/some/dir' );
-
+__PACKAGE__->context_class( 'TestApp::Context' );
 __PACKAGE__->setup;
 
-sub execute {
-    my $c      = shift;
-    my $class  = ref( $c->component( $_[0] ) ) || $_[0];
-    my $action = $_[1]->reverse();
-
-    my $method;
-
-    if ( $action =~ /->(\w+)$/ ) {
-        $method = $1;
-    }
-    elsif ( $action =~ /\/(\w+)$/ ) {
-        $method = $1;
-    }
-    elsif ( $action =~ /^(\w+)$/ ) {
-        $method = $action;
-    }
-
-    if ( $class && $method && $method !~ /^_/ ) {
-        my $executed = sprintf( "%s->%s", $class, $method );
-        my @executed = $c->response->headers->header('X-Catalyst-Executed');
-        push @executed, $executed;
-        $c->response->headers->header(
-            'X-Catalyst-Executed' => join ', ',
-            @executed
-        );
-    }
-
-    return $c->SUPER::execute(@_);
-}
-
 1;