Add tests which should fail, but don't.
[catagits/Catalyst-Action-REST.git] / t / lib / Test / Catalyst / Action / REST / Controller / Serialize.pm
index c4111da..9d358c4 100644 (file)
@@ -1,13 +1,13 @@
 package Test::Catalyst::Action::REST::Controller::Serialize;
 
-use strict;
-use warnings;
-use base 'Catalyst::Controller';
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' }
 
 __PACKAGE__->config(
     'default'   => 'text/x-yaml',
     'stash_key' => 'rest',
-    'content_type_stash_key' => 'serialize_content_type',
     'map'       => {
         'text/x-yaml'        => 'YAML',
         'application/json'   => 'JSON',
@@ -25,6 +25,7 @@ sub test :Local :ActionClass('Serialize') {
 
 sub test_second :Local :ActionClass('Serialize') {
     my ( $self, $c ) = @_;
+    # 'serialize_content_type' is configured in the test config in t/conf
     $c->stash->{'serialize_content_type'} = $c->req->params->{'serialize_content_type'};
     $c->stash->{'rest'} = {
         lou => 'is my cat',