From d24697e432f7b6c44eb770b4868fa63d8e491b52 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Thu, 18 Jul 2019 15:03:40 +0200 Subject: [PATCH] Bug 11999: Test improvements improve t/db_dependent/Reserves.t to make tests pass on UNIMARC installation --- t/db_dependent/Reserves.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 618f0598c9..aec9423674 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -61,7 +61,11 @@ my $frameworkcode = q//; t::lib::Mocks::mock_preference('ReservesNeedReturns', 1); # Somewhat arbitrary field chosen for age restriction unit tests. Must be added to db before the framework is cached -$dbh->do("update marc_subfield_structure set kohafield='biblioitems.agerestriction' where tagfield='521' and tagsubfield='a' and frameworkcode=?", undef, $frameworkcode); +$dbh->do(q| + INSERT INTO marc_subfield_structure (frameworkcode, tagfield, tagsubfield, kohafield) + VALUES ('', '521', 'a', 'biblioitems.agerestriction') + ON DUPLICATE KEY UPDATE kohafield = VALUES(kohafield) +|); my $cache = Koha::Caches->get_instance; $cache->clear_from_cache("MarcStructure-0-$frameworkcode"); $cache->clear_from_cache("MarcStructure-1-$frameworkcode"); -- 2.20.1