X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Frefined_search_on_relation.t;h=e27687c01d5bfdc91003ce8d292713141cb65bfc;hb=5ff6d6034ddcb696d24c4b716b5c12f109004d1f;hp=8a7035c20677af247afd797ac1ae23ca021ae6c3;hpb=9ae300a43ff4db9bf5084a009cce726c694f3612;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/prefetch/refined_search_on_relation.t b/t/prefetch/refined_search_on_relation.t index 8a7035c..e27687c 100644 --- a/t/prefetch/refined_search_on_relation.t +++ b/t/prefetch/refined_search_on_relation.t @@ -1,8 +1,10 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; -use lib qw(t/lib); + use DBICTest; my $schema = DBICTest->init_schema(); @@ -25,11 +27,7 @@ is ( ); # this still should emit no queries: -{ - my $queries = 0; - my $orig_debug = $schema->storage->debug; - $schema->storage->debugcb(sub { $queries++; }); - $schema->storage->debug(1); +$schema->is_executed_querycount( sub { my $cds = $art->cds; is ( @@ -47,10 +45,6 @@ is ( ); } - $schema->storage->debug($orig_debug); - $schema->storage->debugcb(undef); - - is ($queries, 0, 'No queries on prefetched operations'); -} +}, 0, 'No queries on prefetched operations'); done_testing;