10 my ( $pager, $it ) = DBICTest::CD->page(
12 { order_by => 'title',
17 is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
19 is( $pager->next_page, 2, "next_page ok" );
21 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
26 is( $it->next, undef, "next past end of page ok" );
29 ( $pager, $it ) = DBICTest::CD->page(
31 { order_by => 'title',
36 is( $pager->entries_on_this_page, 2, "entries on second page ok" );
38 is( $it->next->title, "Generic Manufactured Singles", "second page first title ok" );
40 # XXX: Should we support disable_sql_paging?
41 #( $pager, $it ) = DBICTest::CD->page(
45 # disable_sql_paging => 1 } );
47 #cmp_ok( $pager->total_entries, '==', 5, "disable_sql_paging total_entries ok" );
49 #cmp_ok( $pager->previous_page, '==', 1, "disable_sql_paging previous_page ok" );
51 #is( $it->next->title, "Caterwaulin' Blues", "disable_sql_paging iterator->next ok" );
55 #is( $it->next, undef, "disable_sql_paging next past end of page ok" );
57 # based on a failing criteria submitted by waswas
58 # requires SQL::Abstract >= 1.20
59 ( $pager, $it ) = DBICTest::CD->page(
66 -not_like => 'Forkful%'
72 is( $it->count, 1, "complex abstract count ok" );