View | Details | Raw Unified | Return to bug 17091
Collapse All | Expand All

(-)a/Koha/Objects.pm (-11 lines)
Lines 130-146 sub search { Link Here
130
    }
130
    }
131
}
131
}
132
132
133
=head3 Koha::Objects->pager();
134
135
my $pager = Koha::Objects->pager;
136
137
=cut
138
139
sub pager {
140
    my ( $self ) = @_;
141
    return $self->_resultset->pager;
142
}
143
144
=head3 Koha::Objects->next();
133
=head3 Koha::Objects->next();
145
134
146
my $object = Koha::Objects->next();
135
my $object = Koha::Objects->next();
(-)a/t/db_dependent/Koha/Objects.t (-2 / +7 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 3;
22
use Test::More tests => 4;
23
23
24
use Koha::Authority::Types;
24
use Koha::Authority::Types;
25
use Koha::Cities;
25
use Koha::Cities;
Lines 51-55 subtest 'update' => sub { Link Here
51
    is( Koha::Cities->search( { city_country => 'UK' } )->count, 0, 'Koha::Objects->update should have updated the 3 rows' );
51
    is( Koha::Cities->search( { city_country => 'UK' } )->count, 0, 'Koha::Objects->update should have updated the 3 rows' );
52
};
52
};
53
53
54
subtest 'pager' => sub {
55
    plan tests => 1;
56
    my $pager = Koha::Patrons->search( {}, { page => 1, rows => 2 } )->pager;
57
    is( ref($pager), 'DBIx::Class::ResultSet::Pager', 'Koha::Objects->pager returns a valid DBIx::Class object' );
58
};
59
54
$schema->storage->txn_rollback;
60
$schema->storage->txn_rollback;
55
1;
61
1;
56
- 

Return to bug 17091