10 my $it = DBICTest::CD->search(
12 { order_by => 'title',
17 is( $it->pager->entries_on_this_page, 3, "entries_on_this_page ok" );
19 is( $it->pager->next_page, 2, "next_page ok" );
21 is( $it->count, 3, "count on paged rs ok" );
23 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
28 is( $it->next, undef, "next past end of page ok" );
30 # second page, testing with array
31 my @page2 = DBICTest::CD->search(
33 { order_by => 'title',
38 is( $page2[0]->title, "Generic Manufactured Singles", "second page first title ok" );
40 # page a standard resultset
41 $it = DBICTest::CD->search(
43 { order_by => 'title',
46 my $page = $it->page(2);
48 is( $page->count, 2, "standard resultset paged rs count ok" );
50 is( $page->next->title, "Generic Manufactured Singles", "second page of standard resultset ok" );
52 # test software-based limit paging
53 $it = DBICTest::CD->search(
55 { order_by => 'title',
60 is( $it->pager->entries_on_this_page, 2, "software entries_on_this_page ok" );
62 is( $it->pager->previous_page, 1, "software previous_page ok" );
64 is( $it->count, 2, "software count on paged rs ok" );
66 is( $it->next->title, "Generic Manufactured Singles", "software iterator->next ok" );