Docs and fix test
[catagits/Catalyst-Action-REST.git] / t / lib / Test / Serialize / Controller / REST.pm
index 118e237..5b7c4ec 100644 (file)
@@ -27,13 +27,16 @@ __PACKAGE__->config(
         'text/view'   => [ 'View', 'Simple' ],
         'text/explodingview' => [ 'View', 'Awful' ],
         'text/broken' => 'Broken',
+        'text/javascript', => 'JSONP',
+        'application/x-javascript' => 'JSONP',
+        'application/javascript' => 'JSONP',
     },
 );
 
 sub monkey_put : Local : ActionClass('Deserialize') {
     my ( $self, $c ) = @_;
     if ( ref($c->req->data) eq "HASH" ) {
-        my $out = $c->req->data->{'sushi'} . $c->req->data->{'chicken'}||'';
+        my $out = ($c->req->data->{'sushi'}||'') . ($c->req->data->{'chicken'}||'');
         utf8::encode($out);
         $c->res->output( $out );
     } else {