From c0392a4c4ab73cd5c8d27a2e15cd2fa813a65c04 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 4 Mar 2021 09:42:23 +0100 Subject: [PATCH] Bug 27837: Prevent the tests to fail is the field is mapped Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Items.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index 4ab2e2dac62..ef4de8f20b8 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -1040,6 +1040,15 @@ subtest 'ModItemFromMarc' => sub { subtest 'permanent_location' => sub { plan tests => 6; + # Make sure items.permanent_location is not mapped + Koha::MarcSubfieldStructures->search( + { + frameworkcode => q{}, + kohafield => 'items.permanent_location', + } + )->delete; + Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); + my $item = $builder->build_sample_item; # By default, setting location to something new should set permanent location to the same thing @@ -1079,4 +1088,5 @@ subtest 'ModItemFromMarc' => sub { }; $schema->storage->txn_rollback; -}; + Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); +} -- 2.30.1