5 use lib 't/cdbi/testlib';
9 Film->create({ Title => 'Film 1' }),
10 Film->create({ Title => 'Film 2' }),
11 Film->create({ Title => 'Film 3' }),
12 Film->create({ Title => 'Film 4' }),
13 Film->create({ Title => 'Film 5' }),
17 my ( $pager, $it ) = Film->page(
23 is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
25 is( $pager->next_page, 2, "next_page ok" );
27 is( $it->next->title, "Film 1", "iterator->next ok" );
32 is( $it->next, undef, "next past end of page ok" );
35 ( $pager, $it ) = Film->page(
41 is( $pager->entries_on_this_page, 2, "entries on second page ok" );
43 is( $it->next->title, "Film 4", "second page first title ok" );