4 use lib 't/cdbi/testlib';
8 Film->create({ Title => 'Film 1' }),
9 Film->create({ Title => 'Film 2' }),
10 Film->create({ Title => 'Film 3' }),
11 Film->create({ Title => 'Film 4' }),
12 Film->create({ Title => 'Film 5' }),
16 my ( $pager, $it ) = Film->page(
22 is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
24 is( $pager->next_page, 2, "next_page ok" );
26 is( $it->next->title, "Film 1", "iterator->next ok" );
31 is( $it->next, undef, "next past end of page ok" );
34 ( $pager, $it ) = Film->page(
40 is( $pager->entries_on_this_page, 2, "entries on second page ok" );
42 is( $it->next->title, "Film 4", "second page first title ok" );