X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F76joins.t;h=069626aff869edf2232b7fecf0ba0bc12de08ae3;hb=ae51573612aec70814b81bfe0c3683b824564368;hp=63e03636b4f9cae5b98365d49af24a54f5ba2cb9;hpb=d6915f449e2d68ac184d6bc616043fd605913757;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/76joins.t b/t/76joins.t index 63e0363..069626a 100644 --- a/t/76joins.t +++ b/t/76joins.t @@ -13,7 +13,7 @@ BEGIN { eval "use DBD::SQLite"; plan $@ ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( tests => 44 ); + : ( tests => 42 ); } # figure out if we've got a version of sqlite that is older than 3.2.6, in @@ -107,10 +107,6 @@ $rs = $schema->resultset("CD")->search( ); cmp_ok( scalar $rs->all, '==', scalar $rs->slice(0, $rs->count - 1), 'slice() with join has same count as all()' ); -eval { $rs->search(undef, { rows => 0, offset => 3 })->all; }; - -ok($@, "rows => 0 errors: $@"); - $rs = $schema->resultset("Artist")->search( { 'liner_notes.notes' => 'Kill Yourself!' }, { join => { 'cds' => 'liner_notes' } }); @@ -283,22 +279,3 @@ $schema->storage->debug(0); cmp_ok($queries, '==', 1, 'Only one query run'); -# has_many resulting in an additional select if no records available despite prefetch -my $track = $schema->resultset("Artist")->create( { - artistid => 4, - name => 'Artist without CDs', -} ); - -$queries = 0; -$schema->storage->debug(1); - -my $artist_without_cds = $schema->resultset("Artist")->find(4, { - join => [qw/ cds /], - prefetch => [qw/ cds /], -}); -my @no_cds = $artist_without_cds->cds; - -is($queries, 1, 'prefetch ran only 1 sql statement'); - -$schema->storage->debug(0); -