From: Peter Rabbitson Date: Fri, 19 Jun 2009 14:36:08 +0000 (+0000) Subject: throw in an extra limit, sophisticate test a bit X-Git-Tag: v0.08108~76^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a3683eae9d504a28c72307801753dbf7a6df3c15;p=dbsrgits%2FDBIx-Class.git throw in an extra limit, sophisticate test a bit --- diff --git a/t/prefetch/with_limit.t b/t/prefetch/with_limit.t index a1c196f..08df104 100644 --- a/t/prefetch/with_limit.t +++ b/t/prefetch/with_limit.t @@ -8,7 +8,7 @@ use Test::Exception; use lib qw(t/lib); use DBICTest; -plan tests => 8; +plan tests => 9; my $schema = DBICTest->init_schema(); @@ -85,6 +85,9 @@ throws_ok ( ); my $artist = $use_prefetch->search({'cds.title' => $artist_many_cds->cds->first->title })->next; - is($artist->cds->count, 1, "count on search limiting prefetched has_many"); +# try with double limit +my $artist2 = $use_prefetch->search({'cds.title' => { '!=' => $artist_many_cds->cds->first->title } })->slice (0,0)->next; +is($artist2->cds->count, 2, "count on search limiting prefetched has_many"); +