Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 21; |
20 |
use Test::More tests => 22; |
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 1058-1063
subtest 'UpdateTotalIssues on Invalid record' => sub {
Link Here
|
1058 |
}; |
1058 |
}; |
1059 |
|
1059 |
|
1060 |
|
1060 |
|
|
|
1061 |
subtest 'AddBiblio/ModBiblio calling ModBiblioMarc for field 005' => sub { |
1062 |
plan tests => 2; |
1063 |
|
1064 |
my $marc_record = MARC::Record->new; |
1065 |
my ($biblionumber) = C4::Biblio::AddBiblio( $marc_record, '' ); |
1066 |
my $biblio = Koha::Biblios->find($biblionumber); |
1067 |
|
1068 |
my $field = $biblio->metadata->record->field('005'); |
1069 |
ok( $field && $field->data, 'Record contains field 005 after AddBiblio' ); |
1070 |
$marc_record = MARC::Record->new; |
1071 |
C4::Biblio::ModBiblio( $marc_record, $biblionumber, '' ); |
1072 |
$field = $biblio->metadata->record->field('005'); |
1073 |
ok( $field && $field->data, 'Record contains field 005 after ModBiblio' ); |
1074 |
}; |
1075 |
|
1061 |
# Cleanup |
1076 |
# Cleanup |
1062 |
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); |
1077 |
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); |
1063 |
$schema->storage->txn_rollback; |
1078 |
$schema->storage->txn_rollback; |
1064 |
- |
|
|