X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fdispatch_misc.t;h=0c11f2c117d4eb2e4a2e34ad3868c17b56cbaa0b;hb=c62cf40ac80b302b71683630b11b6157f018ba4a;hp=094c76ad3ba0b57b53dc6c74ece117c4aeffe725;hpb=35075f9da9809911b06bc2d016ab8e935c371179;p=catagits%2FWeb-Simple.git diff --git a/t/dispatch_misc.t b/t/dispatch_misc.t index 094c76a..0c11f2c 100644 --- a/t/dispatch_misc.t +++ b/t/dispatch_misc.t @@ -89,10 +89,10 @@ sub array_with_sub { } ); - my $get = run_request( GET => 'http://localhost/' ); + eval { run_request( GET => 'http://localhost/' ) }; - cmp_ok $get->code, '==', 999, - "if a route returns an arrayref with a single sub in it, then WD redispatches to that sub"; + like $@, qr/Can't call method "request" on an undefined value .*MockHTTP/, +"if a route returns an arrayref with a single sub in it, then that sub is returned as a response by WD, causing HTTP::Message::PSGI to choke"; } sub array_with_no_sub {