Bugzilla – Attachment 156089 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.06 KB, created by
Jonathan Druart
on 2023-09-22 13:00:24 UTC
(
hide
)
Description:
Bug 34842: Fix Illrequest/Config.t if DB upgraded twice
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-09-22 13:00:24 UTC
Size:
2.06 KB
patch
obsolete
>From 0c1d646b0baf91f99912ba22b2c78ea3a0e440e1 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! >--- > 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 84f4067df34..fa035e1b755 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 ae1535ef774..1034abbec20 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.25.1
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