Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 21; |
22 |
use Test::More tests => 22; |
23 |
use Test::Exception; |
23 |
use Test::Exception; |
24 |
use Test::Warn; |
24 |
use Test::Warn; |
25 |
|
25 |
|
Lines 799-801
subtest 'prefetch_whitelist() tests' => sub {
Link Here
|
799 |
|
799 |
|
800 |
$schema->storage->txn_rollback; |
800 |
$schema->storage->txn_rollback; |
801 |
}; |
801 |
}; |
802 |
- |
802 |
|
|
|
803 |
subtest 'empty() tests' => sub { |
804 |
|
805 |
plan tests => 3; |
806 |
|
807 |
$schema->storage->txn_begin; |
808 |
|
809 |
# Add a patron, we need more than 0 |
810 |
$builder->build_object({ class => 'Koha::Patrons' }); |
811 |
ok( Koha::Patrons->count > 0, 'There is more than one Koha::Patron on the resultset' ); |
812 |
|
813 |
my $empty = Koha::Patrons->new->empty; |
814 |
is( ref($empty), 'Koha::Patrons', '->empty returns a Koha::Patrons iterator' ); |
815 |
is( $empty->count, 0, 'The empty resultset is, well, empty :-D' ); |
816 |
|
817 |
$schema->storage->txn_rollback; |
818 |
}; |