1 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
8 use lib 't/cdbi/testlib';
12 Film->create({ Title => 'Film 1' }),
13 Film->create({ Title => 'Film 2' }),
14 Film->create({ Title => 'Film 3' }),
15 Film->create({ Title => 'Film 4' }),
16 Film->create({ Title => 'Film 5' }),
20 my ( $pager, $it ) = Film->page(
26 is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
28 is( $pager->next_page, 2, "next_page ok" );
30 is( $it->next->title, "Film 1", "iterator->next ok" );
35 is( $it->next, undef, "next past end of page ok" );
38 ( $pager, $it ) = Film->page(
44 is( $pager->entries_on_this_page, 2, "entries on second page ok" );
46 is( $it->next->title, "Film 4", "second page first title ok" );