X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F86might_have.t;h=8ebf7b8880e4630db4fa69d5056674e5c664bba7;hb=63bb9738dd8fdca42ad88d99a2a3861ad2b00eed;hp=81cbf84bc8bec35b78e6b0577f83a52f6fab0907;hpb=a47e123334d8bcea0d34dc9ea09738d6f3b1fd49;p=dbsrgits%2FDBIx-Class.git diff --git a/t/86might_have.t b/t/86might_have.t index 81cbf84..8ebf7b8 100644 --- a/t/86might_have.t +++ b/t/86might_have.t @@ -8,14 +8,11 @@ use DBICTest; my $schema = DBICTest->init_schema(); my $queries; -#$schema->storage->debugfh(IO::File->new('t/var/temp.trace', 'w')); $schema->storage->debugcb( sub{ $queries++ } ); +my $sdebug = $schema->storage->debug; -eval "use DBD::SQLite"; -plan skip_all => 'needs DBD::SQLite for testing' if $@; plan tests => 2; - my $cd = $schema->resultset("CD")->find(1); $cd->title('test'); @@ -28,7 +25,7 @@ $cd->update; is($queries, 1, 'liner_notes (might_have) not prefetched - do not load liner_notes on update'); -$schema->storage->debug(0); +$schema->storage->debug($sdebug); my $cd2 = $schema->resultset("CD")->find(2, {prefetch => 'liner_notes'}); @@ -43,5 +40,4 @@ $cd2->update; is($queries, 1, 'liner_notes (might_have) prefetched - do not load liner_notes on update'); -$schema->storage->debug(0); - +$schema->storage->debug($sdebug);