Add extra test for prefetch+has_many
Ash Berlin [Fri, 19 Jun 2009 14:31:11 +0000 (14:31 +0000)]
t/prefetch/with_limit.t

index 6e849f2..d1f9d19 100644 (file)
@@ -83,3 +83,8 @@ throws_ok (
   qr/resultsets prefetching has_many/,
   'single() with multiprefetch is illegal',
 );
+
+my $artist = $use_prefetch->search({'cds.title' => $artist_many_cds->cds->first->title })->slice->next;
+
+is($artist->cds->count, 1, "count on search limiting prefetched has_many");
+