Lines 44-49
subtest 'Basics' => sub {
Link Here
|
44 |
$schema->storage->txn_begin; |
44 |
$schema->storage->txn_begin; |
45 |
|
45 |
|
46 |
t::lib::Mocks::mock_config("interlibrary_loans", {}); |
46 |
t::lib::Mocks::mock_config("interlibrary_loans", {}); |
|
|
47 |
t::lib::Mocks::mock_preference('ILLPartnerCode', undef); |
47 |
|
48 |
|
48 |
my $config = Koha::Illrequest::Config->new; |
49 |
my $config = Koha::Illrequest::Config->new; |
49 |
isa_ok($config, "Koha::Illrequest::Config", |
50 |
isa_ok($config, "Koha::Illrequest::Config", |
Lines 60-66
subtest 'Basics' => sub {
Link Here
|
60 |
is($config->backend_dir, "/tmp/", "backend_dir: setter is persistent."); |
61 |
is($config->backend_dir, "/tmp/", "backend_dir: setter is persistent."); |
61 |
|
62 |
|
62 |
# partner_code: |
63 |
# partner_code: |
63 |
is($config->partner_code, "IL", "partner_code: Undefined partner_code is undefined."); |
64 |
is($config->partner_code, 'IL', "partner_code: Undefined partner_code fallback to 'IL'."); |
64 |
is($config->partner_code("ILTST"), "ILTST", "partner_code: setter works."); |
65 |
is($config->partner_code("ILTST"), "ILTST", "partner_code: setter works."); |
65 |
is($config->partner_code, "ILTST", "partner_code: setter is persistent."); |
66 |
is($config->partner_code, "ILTST", "partner_code: setter is persistent."); |
66 |
|
67 |
|
Lines 198-203
subtest '_load_configuration' => sub {
Link Here
|
198 |
$schema->storage->txn_begin; |
199 |
$schema->storage->txn_begin; |
199 |
|
200 |
|
200 |
my $config = Koha::Illrequest::Config->new; |
201 |
my $config = Koha::Illrequest::Config->new; |
|
|
202 |
t::lib::Mocks::mock_preference('ILLPartnerCode', 'IL'); |
201 |
|
203 |
|
202 |
# Return basic configuration |
204 |
# Return basic configuration |
203 |
is_deeply( |
205 |
is_deeply( |
204 |
- |
|
|