1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
9 use lib 't/cdbi/testlib';
13 Film->create({ Title => 'Film 1' }),
14 Film->create({ Title => 'Film 2' }),
15 Film->create({ Title => 'Film 3' }),
16 Film->create({ Title => 'Film 4' }),
17 Film->create({ Title => 'Film 5' }),
21 my ( $pager, $it ) = Film->page(
27 is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
29 is( $pager->next_page, 2, "next_page ok" );
31 is( $it->next->title, "Film 1", "iterator->next ok" );
36 is( $it->next, undef, "next past end of page ok" );
39 ( $pager, $it ) = Film->page(
45 is( $pager->entries_on_this_page, 2, "entries on second page ok" );
47 is( $it->next->title, "Film 4", "second page first title ok" );