X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Flazy_cursor.t;h=de6e9361e379c71a32652023b2f668cfe3bf941a;hb=c200d94979bde5ac74070d3e898927433b0e667c;hp=220e3c61aa777aa551041e368d2c8ffccfbd3fb4;hpb=69e99ee63239ebcdd53f4aaa05c5cea5a54ed624;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/lazy_cursor.t b/t/prefetch/lazy_cursor.t index 220e3c6..de6e936 100644 --- a/t/prefetch/lazy_cursor.t +++ b/t/prefetch/lazy_cursor.t @@ -75,4 +75,15 @@ ok ($unordered_rs->next, "got row $_") for (2 .. $initial_artists_cnt + 3); is ($unordered_rs->next, undef, 'End of RS reached'); is ($unordered_rs->next, undef, 'End of RS not lost'); +{ + my $non_uniquely_ordered_constrained = $schema->resultset('CD')->search( + { artist => 1 }, + { order_by => [qw( me.genreid me.title me.year )], prefetch => 'tracks' }, + ); + + isa_ok ($non_uniquely_ordered_constrained->next, 'DBICTest::CD' ); + + ok( defined $non_uniquely_ordered_constrained->cursor->next, 'Cursor not exhausted' ); +} + done_testing;