X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fmanual.t;h=c6d1f6a9b21666678fe584b85b0e20841a56f2f6;hb=69e99ee63239ebcdd53f4aaa05c5cea5a54ed624;hp=222fe35b3e7b1f6ee0d677a4cfa2b02c6b0f121a;hpb=6ad439d45d83a4a1061ab7e4ab95af9e59cdd53b;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/manual.t b/t/prefetch/manual.t index 222fe35..c6d1f6a 100644 --- a/t/prefetch/manual.t +++ b/t/prefetch/manual.t @@ -3,6 +3,7 @@ use warnings; use Test::More; use Test::Deep; +use Test::Warn; use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -186,7 +187,7 @@ cmp_deeply ( ); TODO: { - my $row = $rs->next; + my ($row) = $rs->all; local $TODO = 'Something is wrong with filter type rels, they throw on incomplete objects >.<'; lives_ok { @@ -198,9 +199,6 @@ TODO: { } 'no exception'; } -is ($rs->cursor->next, undef, 'cursor exhausted'); - - TODO: { local $TODO = 'this does not work at all, need to promote rsattrs to an object on its own'; # make sure has_many column redirection does not do weird stuff when collapse is requested @@ -269,9 +267,12 @@ $schema->storage->debug (1); for my $use_next (0, 1) { my @random_cds; if ($use_next) { - while (my $o = $rs_random->next) { - push @random_cds, $o; - } + warnings_exist { + while (my $o = $rs_random->next) { + push @random_cds, $o; + } + } qr/performed an eager cursor slurp underneath/, + 'Warned on auto-eager cursor'; } else { @random_cds = $rs_random->all;