X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fmultiple_hasmany.t;h=cd86f17e371a8761ca4580f832f3fda1a0800a40;hb=906c03556a6c5584b3f2f18eb7501cc4c48704a1;hp=3853c6895d456e446d8c32856c9b9d46e9a27a4f;hpb=8273e845426f0187b4ad6c4a1b42286fa09a648f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/multiple_hasmany.t b/t/prefetch/multiple_hasmany.t index 3853c68..cd86f17 100644 --- a/t/prefetch/multiple_hasmany.t +++ b/t/prefetch/multiple_hasmany.t @@ -2,10 +2,8 @@ use strict; use warnings; use Test::More; -use Test::Exception; use lib qw(t/lib); use DBICTest; -use IO::File; my $schema = DBICTest->init_schema(); my $sdebug = $schema->storage->debug; @@ -40,7 +38,10 @@ TODO: { ok(! $o_mm_warn, 'no warning on attempt to prefetch several same level has_many\'s (1 -> M + M)'); + { + local $TODO; is($queries, 1, 'prefetch one->(has_many,has_many) ran exactly 1 query'); + } $schema->storage->debugcb (undef); $schema->storage->debug ($sdebug); @@ -73,12 +74,16 @@ TODO: { ok(! $m_o_mm_warn, 'no warning on attempt to prefetch several same level has_many\'s (M -> 1 -> M + M)'); + { + local $TODO; + 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)'); is($pr_tags_rs->all, $tags_rs->all, 'equal amount of objects with and without prefetch over several same level has_many\'s (M -> 1 -> M + M)'); + } } # remove this closure once the TODO above is working