Bug 17091: Remove explicit declaration of Koha::Objects->pager
Test plan: prove t/db_dependent/Koha/Objects.t should return green Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
228a9ac882
commit
4383ec732e
2 changed files with 7 additions and 12 deletions
|
@ -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();
|
=head3 Koha::Objects->next();
|
||||||
|
|
||||||
my $object = Koha::Objects->next();
|
my $object = Koha::Objects->next();
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
use Modern::Perl;
|
use Modern::Perl;
|
||||||
|
|
||||||
use Test::More tests => 3;
|
use Test::More tests => 4;
|
||||||
|
|
||||||
use Koha::Authority::Types;
|
use Koha::Authority::Types;
|
||||||
use Koha::Cities;
|
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' );
|
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;
|
$schema->storage->txn_rollback;
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in a new issue