From 301e1781dfe7c8ce9232c37a4db5dd086a3332ae 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 Signed-off-by: Katrin Fischer --- 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 4ab2e2dac6..ef4de8f20b 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.11.0