Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 33; |
22 |
use Test::More tests => 34; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
use Test::Exception; |
24 |
use Test::Exception; |
25 |
use Test::MockModule; |
25 |
use Test::MockModule; |
Lines 368-375
subtest "move_to_deleted" => sub {
Link Here
|
368 |
$retrieved_patron->delete( $patron->{borrowernumber} ); # Cleanup |
368 |
$retrieved_patron->delete( $patron->{borrowernumber} ); # Cleanup |
369 |
}; |
369 |
}; |
370 |
|
370 |
|
371 |
subtest "delete" => sub { |
371 |
subtest "Koha::Patrons->search" => sub { |
372 |
plan tests => 5; |
372 |
plan tests => 1; |
|
|
373 |
|
374 |
my $set = Koha::Patrons->search(); |
375 |
my $count = $set->count; |
376 |
my $reduced_set = $set->search({ borrowernumber => { '>' => 0 } }); |
377 |
my $reduced_count = $reduced_set->count; |
378 |
is ( $count, $reduced_count, "System users not found in Koha::Patrons->search"); |
379 |
}; |
380 |
|
381 |
subtest "Koha::Patron->delete" => sub { |
382 |
plan tests => 6; |
373 |
t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); |
383 |
t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); |
374 |
my $patron = $builder->build( { source => 'Borrower' } ); |
384 |
my $patron = $builder->build( { source => 'Borrower' } ); |
375 |
my $retrieved_patron = Koha::Patrons->find( $patron->{borrowernumber} ); |
385 |
my $retrieved_patron = Koha::Patrons->find( $patron->{borrowernumber} ); |
376 |
- |
|
|