From e0bc64cae79c73a82e927762e62efc8450bfe8a9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 25 Mar 2020 08:04:26 +0000 Subject: [PATCH] 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 --- t/db_dependent/Items.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index 2397a5dff3..362d74c5f0 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -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} ); -- 2.20.1