Lines 193-199
subtest '_load_unit_config' => sub {
Link Here
|
193 |
|
193 |
|
194 |
subtest '_load_configuration' => sub { |
194 |
subtest '_load_configuration' => sub { |
195 |
|
195 |
|
196 |
plan tests => 9; |
196 |
plan tests => 10; |
197 |
|
197 |
|
198 |
$schema->storage->txn_begin; |
198 |
$schema->storage->txn_begin; |
199 |
|
199 |
|
Lines 388-407
subtest '_load_configuration' => sub {
Link Here
|
388 |
|
388 |
|
389 |
# Partner library category |
389 |
# Partner library category |
390 |
is_deeply( |
390 |
is_deeply( |
391 |
Koha::Illrequest::Config::_load_configuration({ partner_code => 'FOOBAR' }), |
391 |
Koha::Illrequest::Config::_load_configuration( { partner_code => 'FOOBAR' } ), |
392 |
{ |
392 |
{ |
393 |
backend_directory => undef, |
393 |
backend_directory => undef, |
394 |
censorship => { |
394 |
censorship => { |
395 |
censor_notes_staff => 0, |
395 |
censor_notes_staff => 0, |
396 |
censor_reply_date => 0, |
396 |
censor_reply_date => 0, |
397 |
}, |
397 |
}, |
398 |
limits => {}, |
398 |
limits => {}, |
399 |
digital_recipients => {}, |
399 |
digital_recipients => {}, |
400 |
prefixes => {}, |
400 |
prefixes => {}, |
401 |
partner_code => 'FOOBAR', |
401 |
partner_code => 'IL', |
402 |
raw_config => { partner_code => 'FOOBAR' }, |
402 |
raw_config => { partner_code => 'FOOBAR' }, |
403 |
}, |
403 |
}, |
404 |
"load_configuration: Set partner code." |
404 |
q{'partner_code' not read from the config file, default value 'IL' used instead} |
|
|
405 |
); |
406 |
|
407 |
t::lib::Mocks::mock_preference( 'ILLPartnerCode', 'FOOBAR' ); |
408 |
|
409 |
is_deeply( |
410 |
Koha::Illrequest::Config::_load_configuration(), |
411 |
{ |
412 |
backend_directory => undef, |
413 |
censorship => { |
414 |
censor_notes_staff => 0, |
415 |
censor_reply_date => 0, |
416 |
}, |
417 |
limits => {}, |
418 |
digital_recipients => {}, |
419 |
prefixes => {}, |
420 |
partner_code => 'FOOBAR', |
421 |
raw_config => {}, |
422 |
}, |
423 |
q{'ILLPartnerCode' takes precedence over default value for 'partner_code'} |
405 |
); |
424 |
); |
406 |
|
425 |
|
407 |
$schema->storage->txn_rollback; |
426 |
$schema->storage->txn_rollback; |
408 |
- |
|
|