@@ -, +, @@ Koha::Objects->pager prove t/db_dependent/Koha/Objects.t --- Koha/Objects.pm | 11 ----------- t/db_dependent/Koha/Objects.t | 8 +++++++- 2 files changed, 7 insertions(+), 12 deletions(-) --- a/Koha/Objects.pm +++ a/Koha/Objects.pm @@ -130,17 +130,6 @@ sub search { } } -=head3 Koha::Objects->pager(); - -my $pager = Koha::Objects->pager; - -=cut - -sub pager { - my ( $self ) = @_; - return $self->_resultset->pager; -} - =head3 Koha::Objects->next(); my $object = Koha::Objects->next(); --- a/t/db_dependent/Koha/Objects.t +++ a/t/db_dependent/Koha/Objects.t @@ -19,7 +19,7 @@ use Modern::Perl; -use Test::More tests => 3; +use Test::More tests => 4; use Koha::Authority::Types; use Koha::Cities; @@ -51,5 +51,11 @@ subtest 'update' => sub { is( Koha::Cities->search( { city_country => 'UK' } )->count, 0, 'Koha::Objects->update should have updated the 3 rows' ); }; +subtest 'pager' => sub { + plan tests => 1; + my $pager = Koha::Patrons->search( {}, { page => 1, rows => 2 } )->pager; + is( ref($pager), 'DBIx::Class::ResultSet::Pager', 'Koha::Objects->pager returns a valid DBIx::Class object' ); +}; + $schema->storage->txn_rollback; 1; --