X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Fdata_handler.t;h=eca273c6e8b0192c7c638de5cde7d25ecf2a7ced;hp=0d4af33b4961cf96bd94853196fcb48f12916162;hb=HEAD;hpb=3eba0dd58db00c12f2847f38e479677bb582e4d7 diff --git a/t/data_handler.t b/t/data_handler.t index 0d4af33..eca273c 100644 --- a/t/data_handler.t +++ b/t/data_handler.t @@ -1,5 +1,3 @@ -#!/usr/bin/env perl - use warnings; use strict; @@ -30,5 +28,13 @@ ok my($res, $c) = ctx_request('/'); is $response->content, 'expected', 'expected content body'; } +{ + my $out; + local *STDERR; + open(STDERR, ">", \$out) or die "Can't open STDERR: $!"; + ok my $req = POST $c->uri_for_action('/test_nested_for'), 'Content-Type' => 'multipart/form-data', Content => { die => "a horrible death" }; + ok my $response = request $req; + is($out, "[error] multipart/form-data does not have an available data handler. Valid data_handlers are application/json, application/x-www-form-urlencoded.\n", 'yep we throw the slightly more usefull error'); +} done_testing;