X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fmultiple_hasmany.t;h=ca89d55b84db97de5404fb088bb24c4aea1e30b6;hb=a2287768f5c3dd665c469d7f9dfe99d369ff6781;hp=96d86c540e197c99a7b53dd5e23763d76a1258a8;hpb=2e2512552309024151dc45c24b66032f510ca613;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/prefetch/multiple_hasmany.t b/t/prefetch/multiple_hasmany.t index 96d86c5..ca89d55 100644 --- a/t/prefetch/multiple_hasmany.t +++ b/t/prefetch/multiple_hasmany.t @@ -5,13 +5,13 @@ use Test::More; use Test::Exception; use lib qw(t/lib); use DBICTest; -use Data::Dumper; +use IO::File; plan tests => 10; my $schema = DBICTest->init_schema(); +my $sdebug = $schema->storage->debug; -use IO::File; # once the following TODO is complete, remove the 2 warning tests immediately # after the TODO block @@ -44,6 +44,9 @@ TODO: { ok(! $o_mm_warn, 'no warning on attempt to prefetch several same level has_many\'s (1 -> M + M)'); is($queries, 1, 'prefetch one->(has_many,has_many) ran exactly 1 query'); + $schema->storage->debugcb (undef); + $schema->storage->debug ($sdebug); + is($pr_tracks_count, $tracks_count, 'equal count of prefetched relations over several same level has_many\'s (1 -> M + M)'); for ($pr_tracks_rs, $tracks_rs) { @@ -79,6 +82,8 @@ TODO: { ok(! $m_o_mm_warn, 'no warning on attempt to prefetch several same level has_many\'s (M -> 1 -> M + M)'); is($queries, 1, 'prefetch one->(has_many,has_many) ran exactly 1 query'); + $schema->storage->debugcb (undef); + $schema->storage->debug ($sdebug); is($pr_tags_count, $tags_count, 'equal count of prefetched relations over several same level has_many\'s (M -> 1 -> M + M)');