small throw_exception fixes
[dbsrgits/DBIx-Class-Historic.git] / t / 67pager.t
index 85b1e8d..6abea95 100644 (file)
@@ -5,9 +5,9 @@ use Test::More;
 use lib qw(t/lib);
 use DBICTest;
 
-my $schema = DBICTest::init_schema();
+my $schema = DBICTest->init_schema();
 
-plan tests => 12;
+plan tests => 13;
 
 # first page
 my $it = $schema->resultset("CD")->search(
@@ -68,3 +68,11 @@ is( $it->count, 2, "software count on paged rs ok" );
 
 is( $it->next->title, "Generic Manufactured Singles", "software iterator->next ok" );
 
+# test paging with chained searches
+$it = $schema->resultset("CD")->search(
+    {},
+    { rows => 2,
+      page => 2 }
+)->search( undef, { order_by => 'title' } );
+
+is( $it->count, 2, "chained searches paging ok" );