Add tests which should fail, but don't.
[catagits/Catalyst-Action-REST.git] / t / lib / Test / Catalyst / Action / REST / Controller / Override.pm
diff --git a/t/lib/Test/Catalyst/Action/REST/Controller/Override.pm b/t/lib/Test/Catalyst/Action/REST/Controller/Override.pm
new file mode 100644 (file)
index 0000000..7bd0eae
--- /dev/null
@@ -0,0 +1,22 @@
+package Test::Catalyst::Action::REST::Controller::Override;
+
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' }
+
+__PACKAGE__->config(
+    'default'   => 'application/json',
+    'map'       => {
+        'application/json'   => 'YAML', # Yes, this is deliberate!
+    },
+);
+
+sub test :Local :ActionClass('Serialize') {
+    my ( $self, $c ) = @_;
+    $c->stash->{'rest'} = {
+        lou => 'is my cat',
+    };
+}
+
+1;