Commit | Line | Data |
d9d8aa51 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
4 | |
5 | BEGIN { |
ec9984c8 |
6 | unless (eval 'use CatalystX::LeakChecker 0.05; 1') { |
7 | plan skip_all => 'CatalystX::LeakChecker 0.05 required for this test'; |
d9d8aa51 |
8 | } |
9 | |
10 | plan tests => 4; |
11 | } |
12 | |
13 | use FindBin; |
14 | use lib "$FindBin::Bin/lib"; |
15 | |
da1c9ff8 |
16 | BEGIN { $::setup_leakchecker = 1 } |
17 | |
d9d8aa51 |
18 | use Catalyst::Test 'TestApp'; |
19 | |
20 | { |
21 | my ($resp, $ctx) = ctx_request('/contextclosure/normal_closure'); |
22 | ok($resp->is_success); |
23 | is($ctx->count_leaks, 1); |
24 | } |
25 | |
26 | { |
27 | my ($resp, $ctx) = ctx_request('/contextclosure/context_closure'); |
28 | ok($resp->is_success); |
29 | is($ctx->count_leaks, 0); |
30 | } |