Add deserialize_http_methods attribute to Catalyst::Action::Deserialize.
[catagits/Catalyst-Action-Serialize-Data-Serializer.git] / t / lib / Test / Catalyst / Action / REST / Controller / Deserialize.pm
index 136a9e1..d7723e2 100644 (file)
@@ -1,8 +1,15 @@
 package Test::Catalyst::Action::REST::Controller::Deserialize;
+use Moose;
+use namespace::autoclean;
 
-use base 'Catalyst::Controller';
+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',
@@ -17,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;