fix missing v1.15
[catagits/Catalyst-Action-REST.git] / t / lib / Test / Catalyst / Action / REST / Controller / REST.pm
index 63fdea1..2cc7d46 100644 (file)
@@ -5,6 +5,12 @@ use namespace::autoclean;
 
 BEGIN { extends 'Catalyst::Controller::REST' }
 
+__PACKAGE__->config(
+  'map' => {
+    'text/html'          => 'YAML::HTML',
+    'text/x-yaml'        => 'YAML',
+});
+
 sub test : Local {
     my ( $self, $c ) = @_;
     $self->status_ok( $c,
@@ -76,4 +82,27 @@ sub test_status_gone : Local {
         message => "Document have been deleted by foo", );
 }
 
+sub test_status_see_other : Local {
+    my ( $self, $c ) = @_;
+    $self->status_see_other(
+        $c,
+        location => '/rest',
+        entity   => { somethin => 'happenin' }
+    );
+}
+
+sub opts : Local ActionClass('REST') {}
+
+sub opts_GET {
+    my ( $self, $c ) = @_;
+    $self->status_ok( $c, entity => { opts => 'worked' } );
+}
+
+sub opts_not_implemented {
+    my ( $self, $c ) = @_;
+    $c->res->status(405);
+    $c->res->header('Allow' => [qw(GET HEAD)]);
+    $c->res->body('Not implemented');
+}
+
 1;