Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 20; |
20 |
use Test::More tests => 21; |
21 |
use Test::MockModule; |
21 |
use Test::MockModule; |
22 |
use Test::Warn; |
22 |
use Test::Warn; |
23 |
use List::MoreUtils qw( uniq ); |
23 |
use List::MoreUtils qw( uniq ); |
Lines 1022-1027
subtest 'ModBiblio on invalid record' => sub {
Link Here
|
1022 |
); |
1022 |
); |
1023 |
}; |
1023 |
}; |
1024 |
|
1024 |
|
|
|
1025 |
subtest 'AddBiblio/ModBiblio calling ModBiblioMarc for field 005' => sub { |
1026 |
plan tests => 2; |
1027 |
|
1028 |
my $marc_record = MARC::Record->new; |
1029 |
my ($biblionumber) = C4::Biblio::AddBiblio( $marc_record, '' ); |
1030 |
my $biblio = Koha::Biblios->find($biblionumber); |
1031 |
|
1032 |
my $field = $biblio->metadata->record->field('005'); |
1033 |
ok( $field && $field->data, 'Record contains field 005 after AddBiblio' ); |
1034 |
$marc_record = MARC::Record->new; |
1035 |
C4::Biblio::ModBiblio( $marc_record, $biblionumber, '' ); |
1036 |
$field = $biblio->metadata->record->field('005'); |
1037 |
ok( $field && $field->data, 'Record contains field 005 after ModBiblio' ); |
1038 |
}; |
1039 |
|
1025 |
# Cleanup |
1040 |
# Cleanup |
1026 |
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); |
1041 |
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); |
1027 |
$schema->storage->txn_rollback; |
1042 |
$schema->storage->txn_rollback; |
1028 |
- |
|
|