From: Tomas Doran Date: Fri, 25 Feb 2011 13:56:12 +0000 (+0000) Subject: Fix test X-Git-Tag: 0.90~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=commitdiff_plain;h=e7d5f107746a49a827071c0b361e0a7dcf01e1e5 Fix test --- diff --git a/t/catalyst-action-serialize.t b/t/catalyst-action-serialize.t index ffaf231..aa62651 100644 --- a/t/catalyst-action-serialize.t +++ b/t/catalyst-action-serialize.t @@ -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"; diff --git a/t/lib/Test/Catalyst/Action/REST/Controller/Serialize.pm b/t/lib/Test/Catalyst/Action/REST/Controller/Serialize.pm index 8e0c051..4056898 100644 --- a/t/lib/Test/Catalyst/Action/REST/Controller/Serialize.pm +++ b/t/lib/Test/Catalyst/Action/REST/Controller/Serialize.pm @@ -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) = @_;