Added some tests for auto
[catagits/Catalyst-Runtime.git] / t / live / lib / TestApp / Controller / Action / Auto / Abort.pm
diff --git a/t/live/lib/TestApp/Controller/Action/Auto/Abort.pm b/t/live/lib/TestApp/Controller/Action/Auto/Abort.pm
new file mode 100644 (file)
index 0000000..9a65aac
--- /dev/null
@@ -0,0 +1,26 @@
+package TestApp::Controller::Action::Auto::Abort;
+
+use strict;
+use base 'TestApp::Controller::Action';
+
+sub auto : Private {
+    my ( $self, $c ) = @_;
+    return 0;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'abort default' );
+}
+
+sub end : Private {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'abort end' ) unless $c->res->body;
+}
+
+sub one : Local {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'abort one' );
+}
+
+1;