Add deserialize_http_methods attribute to Catalyst::Action::Deserialize.
[catagits/Catalyst-Action-REST.git] / t / lib / Test / Catalyst / Action / REST / Controller / Deserialize.pm
index 832b51a..d7723e2 100644 (file)
@@ -5,6 +5,11 @@ use namespace::autoclean;
 BEGIN { extends 'Catalyst::Controller' }
 
 __PACKAGE__->config(
+    'action_args' => {
+        'test_action_args' => {
+            'deserialize_http_methods' => [qw(POST PUT OPTIONS DELETE GET)]
+        }
+    },
     'stash_key' => 'rest',
     'map'       => {
         'text/x-yaml'        => 'YAML',
@@ -19,4 +24,9 @@ sub test :Local :ActionClass('Deserialize') {
     $c->res->output($c->req->data->{'kitty'});
 }
 
+sub test_action_args :Local :ActionClass('Deserialize') {
+    my ( $self, $c ) = @_;
+    $c->res->output($c->req->data->{'kitty'});
+}
+
 1;