Bugzilla – Attachment 156362 Details for
Bug 34842
t/db_dependent/Illrequest/Config.t is failing if the DB has been upgraded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34842: Fix Illrequest/Config.t if DB upgraded twice
Bug-34842-Fix-IllrequestConfigt-if-DB-upgraded-twi.patch (text/plain), 2.21 KB, created by
Marcel de Rooy
on 2023-09-29 07:24:47 UTC
(
hide
)
Description:
Bug 34842: Fix Illrequest/Config.t if DB upgraded twice
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-29 07:24:47 UTC
Size:
2.21 KB
patch
obsolete
>From 87383e4954d8ad22abd34cb190e819b24f9e3e97 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 22 Sep 2023 14:59:54 +0200 >Subject: [PATCH] Bug 34842: Fix Illrequest/Config.t if DB upgraded twice >Content-Type: text/plain; charset=utf-8 > >Not sure this is correct, but I think it is! > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Illrequest/Config.pm | 1 - > t/db_dependent/Illrequest/Config.t | 4 +++- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/Illrequest/Config.pm b/Koha/Illrequest/Config.pm >index 84f4067df3..fa035e1b75 100644 >--- a/Koha/Illrequest/Config.pm >+++ b/Koha/Illrequest/Config.pm >@@ -255,7 +255,6 @@ sub _load_configuration { > limits => {}, > digital_recipients => {}, > prefixes => {}, >- partner_code => 'IL', > raw_config => $xml_config, > }; > >diff --git a/t/db_dependent/Illrequest/Config.t b/t/db_dependent/Illrequest/Config.t >index ae1535ef77..1034abbec2 100755 >--- a/t/db_dependent/Illrequest/Config.t >+++ b/t/db_dependent/Illrequest/Config.t >@@ -44,6 +44,7 @@ subtest 'Basics' => sub { > $schema->storage->txn_begin; > > t::lib::Mocks::mock_config("interlibrary_loans", {}); >+ t::lib::Mocks::mock_preference('ILLPartnerCode', undef); > > my $config = Koha::Illrequest::Config->new; > isa_ok($config, "Koha::Illrequest::Config", >@@ -60,7 +61,7 @@ subtest 'Basics' => sub { > is($config->backend_dir, "/tmp/", "backend_dir: setter is persistent."); > > # partner_code: >- is($config->partner_code, "IL", "partner_code: Undefined partner_code is undefined."); >+ is($config->partner_code, 'IL', "partner_code: Undefined partner_code fallback to 'IL'."); > is($config->partner_code("ILTST"), "ILTST", "partner_code: setter works."); > is($config->partner_code, "ILTST", "partner_code: setter is persistent."); > >@@ -198,6 +199,7 @@ subtest '_load_configuration' => sub { > $schema->storage->txn_begin; > > my $config = Koha::Illrequest::Config->new; >+ t::lib::Mocks::mock_preference('ILLPartnerCode', 'IL'); > > # Return basic configuration > is_deeply( >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34842
:
156089
|
156179
| 156362