test cases for the args0 issue
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / HTTPMethods.pm
index e687372..5d42858 100644 (file)
@@ -30,6 +30,16 @@ sub any_method : Path('baz') {
     $ctx->response->body('any');
 }
 
+sub typo_option : Path('opt_typo') OPTION {
+    my ($self, $ctx) = @_;
+    $ctx->response->body('typo');
+}
+
+sub real_options : Path('opt') OPTIONS {
+    my ($self, $ctx) = @_;
+    $ctx->response->body('options');
+}
+
 sub base :Chained('/') PathPrefix CaptureArgs(0) { }
 
 sub chained_get :Chained('base') Args(0) GET {
@@ -70,6 +80,10 @@ sub delete2 :Chained('post_or_delete') PathPart('') Args(0) DELETE {
 
 sub check_default :Chained('base') CaptureArgs(0) { }
 
+sub chain_default :Chained('check_default') PathPart('') Args(0) {
+    pop->res->body('chain_default');
+}
+
 sub default_get :Chained('check_default') PathPart('') Args(0) GET {
     pop->res->body('get3');
 }
@@ -78,8 +92,6 @@ sub default_post :Chained('check_default') PathPart('') Args(0) POST {
     pop->res->body('post3');
 }
 
-sub chain_default :Chained('check_default') PathPart('') Args(0) {
-    pop->res->body('chain_default');
-}
+
 
 __PACKAGE__->meta->make_immutable;