Fix test
Tomas Doran [Fri, 25 Feb 2011 13:56:12 +0000 (13:56 +0000)]
t/catalyst-action-serialize.t
t/lib/Test/Catalyst/Action/REST/Controller/Serialize.pm

index ffaf231..aa62651 100644 (file)
@@ -41,10 +41,6 @@ $res = request($t->get(url => '/serialize/empty_serialized'));
 is $res->content, q[{'foo' => 'bar'}], 'normal case ok';
 ok $res->header('Content-Length'), 'set content-length when we serialize';
 
-$res = request($t->get(url => '/serialize/empty_not_serialized_undef'));
-is $res->content, '', "body explicitly set to undef results in '' content";
-ok !$res->header('Content-Length'), "body explicitly set to undef - no automatic content-length";
-
 $res = request($t->get(url => '/serialize/empty_not_serialized_blank'));
 is $res->content, '', "body explicitly set to '' results in '' content";
 ok !$res->header('Content-Length'), "body explicitly set to '' - no automatic content-length";
index 8e0c051..4056898 100644 (file)
@@ -42,12 +42,6 @@ sub empty : Chained('/') PathPart('serialize') CaptureArgs(0) {
 sub empty_serialized :Chained('empty') Args(0) ActionClass('Serialize') {
 }
 
-# Undef body
-sub empty_not_serialized_undef :Chained('empty') Args(0) ActionClass('Serialize') {
-    my ($self, $c) = @_;
-    $c->res->body(undef);
-}
-
 # Blank body
 sub empty_not_serialized_blank :Chained('empty') Args(0) ActionClass('Serialize') {
     my ($self, $c) = @_;