X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTest%2FSerialize.pm;fp=t%2Flib%2FTest%2FSerialize.pm;h=e19fda93c606742a8a76f66d46507af840a6fd47;hb=faf5c20bff09c91f18b46a3d3d8349379aa36192;hp=cb7c605eb1c19a1d882d6e0f086c7de7f8196ef3;hpb=0bdb8d4585e4b6793cd5f04fc3b499e3a12932f8;p=catagits%2FCatalyst-Action-REST.git diff --git a/t/lib/Test/Serialize.pm b/t/lib/Test/Serialize.pm index cb7c605..e19fda9 100644 --- a/t/lib/Test/Serialize.pm +++ b/t/lib/Test/Serialize.pm @@ -13,47 +13,13 @@ use Catalyst::Runtime '5.70'; 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/view' => [ 'View', 'Simple' ], - 'text/broken' => 'Broken', - }, - } + name => 'Test::Serialize', ); __PACKAGE__->setup; -__PACKAGE__->setup_component("Test::Serialize::View::Simple"); - -sub monkey_put : Local : ActionClass('Deserialize') { - my ( $self, $c ) = @_; - if ( ref($c->req->data) eq "HASH" ) { - $c->res->output( $c->req->data->{'sushi'} ); - } else { - $c->res->output(1) - } -} - -sub monkey_get : Local : ActionClass('Serialize') { - my ( $self, $c ) = @_; - $c->stash->{'rest'} = { monkey => 'likes chicken!', }; -} +__PACKAGE__->setup_component("Test::Serialize::Controller::REST"); +__PACKAGE__->setup_component("Test::Serialize::View::Simple"); 1;