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>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-09-22 14:59:54 +02:00 committed by Tomas Cohen Arazi
parent 4fadf73a95
commit 97307b881d
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 3 additions and 2 deletions

View file

@ -255,7 +255,6 @@ sub _load_configuration {
limits => {},
digital_recipients => {},
prefixes => {},
partner_code => 'IL',
raw_config => $xml_config,
};

View file

@ -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(