Bugzilla – Attachment 156179 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.12 KB, created by
Pedro Amorim
on 2023-09-25 15:59:40 UTC
(
hide
)
Description:
Bug 34842: Fix Illrequest/Config.t if DB upgraded twice
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-09-25 15:59:40 UTC
Size:
2.12 KB
patch
obsolete
>From dfb84becbc9182c649d948fa2a2e3265247b73f6 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 > >Not sure this is correct, but I think it is! > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > 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