5 eval "use DBIx::Class::CDBICompat;";
7 plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');
12 use lib 't/cdbi/testlib';
16 Film->create({ Title => 'Film 1' }),
17 Film->create({ Title => 'Film 2' }),
18 Film->create({ Title => 'Film 3' }),
19 Film->create({ Title => 'Film 4' }),
20 Film->create({ Title => 'Film 5' }),
24 my ( $pager, $it ) = Film->page(
30 is( $pager->entries_on_this_page, 3, "entries_on_this_page ok" );
32 is( $pager->next_page, 2, "next_page ok" );
34 is( $it->next->title, "Film 1", "iterator->next ok" );
39 is( $it->next, undef, "next past end of page ok" );
42 ( $pager, $it ) = Film->page(
48 is( $pager->entries_on_this_page, 2, "entries on second page ok" );
50 is( $it->next->title, "Film 4", "second page first title ok" );