7 my $it = $schema->resultset("CD")->search(
14 is( $it->pager->entries_on_this_page, 3, "entries_on_this_page ok" );
16 is( $it->pager->next_page, 2, "next_page ok" );
18 is( $it->count, 3, "count on paged rs ok" );
20 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
25 is( $it->next, undef, "next past end of page ok" );
27 # second page, testing with array
28 my @page2 = $schema->resultset("CD")->search(
30 { order_by => 'title',
35 is( $page2[0]->title, "Generic Manufactured Singles", "second page first title ok" );
37 # page a standard resultset
38 $it = $schema->resultset("CD")->search(
40 { order_by => 'title',
43 my $page = $it->page(2);
45 is( $page->count, 2, "standard resultset paged rs count ok" );
47 is( $page->next->title, "Generic Manufactured Singles", "second page of standard resultset ok" );
49 # test software-based limit paging
50 $it = $schema->resultset("CD")->search(
52 { order_by => 'title',
57 is( $it->pager->entries_on_this_page, 2, "software entries_on_this_page ok" );
59 is( $it->pager->previous_page, 1, "software previous_page ok" );
61 is( $it->count, 2, "software count on paged rs ok" );
63 is( $it->next->title, "Generic Manufactured Singles", "software iterator->next ok" );