Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 9; |
20 |
use Test::More tests => 10; |
21 |
use Test::MockModule; |
21 |
use Test::MockModule; |
22 |
use List::MoreUtils qw( uniq ); |
22 |
use List::MoreUtils qw( uniq ); |
23 |
use MARC::Record; |
23 |
use MARC::Record; |
Lines 455-460
subtest 'deletedbiblio_metadata' => sub {
Link Here
|
455 |
is( $moved, $biblionumber, 'Found in deletedbiblio_metadata' ); |
455 |
is( $moved, $biblionumber, 'Found in deletedbiblio_metadata' ); |
456 |
}; |
456 |
}; |
457 |
|
457 |
|
|
|
458 |
subtest 'DelBiblio' => sub { |
459 |
plan tests => 2; |
460 |
|
461 |
my ($biblionumber, $biblioitemnumber) = C4::Biblio::AddBiblio(MARC::Record->new, ''); |
462 |
my $deleted = C4::Biblio::DelBiblio( $biblionumber ); |
463 |
is( $deleted, undef, 'DelBiblio returns undef is the biblio has been deleted correctly - Must be 1 instead'); # FIXME We should return 1 instead! |
464 |
|
465 |
$deleted = C4::Biblio::DelBiblio( $biblionumber ); |
466 |
is( $deleted, undef, 'DelBiblo should return undef is the record did not exist'); |
467 |
}; |
468 |
|
458 |
# Cleanup |
469 |
# Cleanup |
459 |
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); |
470 |
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); |
460 |
$schema->storage->txn_rollback; |
471 |
$schema->storage->txn_rollback; |
461 |
- |
|
|