X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flive_component_controller_context_closure.t;h=2d4b894e25e28350c9a1e14ffe2b47c6acf12ce0;hp=94d2ef1ef47b79df426ea1d6ac707419ad421618;hb=ancona-trace;hpb=d9d8aa5102e2b961d4f5f0bdd76d9dbcbcefc1dd diff --git a/t/live_component_controller_context_closure.t b/t/live_component_controller_context_closure.t index 94d2ef1..2d4b894 100644 --- a/t/live_component_controller_context_closure.t +++ b/t/live_component_controller_context_closure.t @@ -3,16 +3,18 @@ use warnings; use Test::More; BEGIN { - unless (eval 'use CatalystX::LeakChecker; 1') { - plan skip_all => 'CatalystX::LeakChecker required for this test'; + unless (eval 'use CatalystX::LeakChecker 0.05; 1') { + plan skip_all => 'CatalystX::LeakChecker 0.05 required for this test'; } - plan tests => 4; + plan tests => 6; } use FindBin; use lib "$FindBin::Bin/lib"; +BEGIN { $::setup_leakchecker = 1 } +local $SIG{__WARN__} = sub { return if $_[0] =~ /Unhandled type: GLOB/; warn $_[0] }; use Catalyst::Test 'TestApp'; { @@ -26,3 +28,9 @@ use Catalyst::Test 'TestApp'; ok($resp->is_success); is($ctx->count_leaks, 0); } + +{ + my ($resp, $ctx) = ctx_request('/contextclosure/non_closure'); + ok($resp->is_success); + is($ctx->count_leaks, 0); +}