Bug 21800: (RM follow-up) Fix unit tests

We were not setting the repeatable flag for the default framework in the
Item2Marc tests and we also needed to flush the cash to get our
framework changes to be recognised.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-03-25 08:04:26 +00:00
parent 2b8900e62c
commit e0bc64cae7
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 10 additions and 1 deletions

View File

@ -964,7 +964,16 @@ subtest 'Split subfields in Item2Marc (Bug 21774)' => sub {
Koha::MarcSubfieldStructures->search({ tagfield => '952', tagsubfield => '8' })->delete; # theoretical precaution
Koha::MarcSubfieldStructures->search({ kohafield => 'items.ccode' })->delete;
my $mapping = Koha::MarcSubfieldStructure->new({ frameworkcode => q{}, tagfield => '952', tagsubfield => '8', kohafield => 'items.ccode' })->store;
my $mapping = Koha::MarcSubfieldStructure->new(
{
frameworkcode => q{},
tagfield => '952',
tagsubfield => '8',
kohafield => 'items.ccode',
repeatable => 1
}
)->store;
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
# Start testing
my $marc = C4::Items::Item2Marc( $item, $biblio->{biblionumber} );