X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTest%2FSerialize.pm;h=29808b371ff6464176d9e1e002d3cd0d2d1e47af;hb=930013e6f19b25a090c3f8839495ad8d9b15ff6d;hp=f549e77b12cd10a05d91751ae43803ef01d697da;hpb=e601addaf89882fccbc824c1a53328f0d049b32b;p=catagits%2FCatalyst-Action-REST.git diff --git a/t/lib/Test/Serialize.pm b/t/lib/Test/Serialize.pm index f549e77..29808b3 100644 --- a/t/lib/Test/Serialize.pm +++ b/t/lib/Test/Serialize.pm @@ -4,8 +4,8 @@ use FindBin; use lib ("$FindBin::Bin/../lib"); -use strict; -use warnings; +use Moose; +use namespace::autoclean; use Catalyst::Runtime '5.70'; @@ -13,36 +13,9 @@ use Catalyst; __PACKAGE__->config( name => 'Test::Serialize', - serialize => { - 'stash_key' => 'rest', - 'map' => { - 'text/html' => 'YAML::HTML', - 'text/xml' => 'XML::Simple', - 'text/x-yaml' => 'YAML', - 'text/x-json' => 'JSON', - 'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ], - 'text/x-data-denter' => [ 'Data::Serializer', 'Data::Denter' ], - 'text/x-data-taxi' => [ 'Data::Serializer', 'Data::Taxi' ], - 'application/x-storable' => [ 'Data::Serializer', 'Storable' ], - 'application/x-freezethaw' => [ 'Data::Serializer', 'FreezeThaw' ], - 'text/x-config-general' => [ 'Data::Serializer', 'Config::General' ], - 'text/x-php-serialization' => [ 'Data::Serializer', 'PHP::Serialization' ], - 'text/broken' => 'Broken', - }, - } ); __PACKAGE__->setup; -sub monkey_put :Local :ActionClass('Deserialize') { - my ( $self, $c ) = @_; - $c->res->output($c->req->data->{'sushi'}); -} - -sub monkey_get :Local :ActionClass('Serialize') { - my ( $self, $c ) = @_; - $c->stash->{'rest'} = { monkey => 'likes chicken!', }; -} - 1;