Lines 60-68
subtest 'Basics' => sub {
Link Here
|
60 |
is($config->backend_dir, "/tmp/", "backend_dir: setter is persistent."); |
60 |
is($config->backend_dir, "/tmp/", "backend_dir: setter is persistent."); |
61 |
|
61 |
|
62 |
# partner_code: |
62 |
# partner_code: |
63 |
is($config->partner_code, "ILLLIBS", "partner_code: Undefined partner_code is undefined."); |
63 |
is($config->partner_code, "IL", "partner_code: Undefined partner_code is undefined."); |
64 |
is($config->partner_code("ILLLIBSTST"), "ILLLIBSTST", "partner_code: setter works."); |
64 |
is($config->partner_code("ILTST"), "ILTST", "partner_code: setter works."); |
65 |
is($config->partner_code, "ILLLIBSTST", "partner_code: setter is persistent."); |
65 |
is($config->partner_code, "ILTST", "partner_code: setter is persistent."); |
66 |
|
66 |
|
67 |
# limits: |
67 |
# limits: |
68 |
is_deeply($config->limits, {}, "limits: Undefined limits is empty hash."); |
68 |
is_deeply($config->limits, {}, "limits: Undefined limits is empty hash."); |
Lines 211-217
subtest '_load_configuration' => sub {
Link Here
|
211 |
limits => {}, |
211 |
limits => {}, |
212 |
digital_recipients => {}, |
212 |
digital_recipients => {}, |
213 |
prefixes => {}, |
213 |
prefixes => {}, |
214 |
partner_code => 'ILLLIBS', |
214 |
partner_code => 'IL', |
215 |
raw_config => {}, |
215 |
raw_config => {}, |
216 |
}, |
216 |
}, |
217 |
"load_configuration: return the base configuration." |
217 |
"load_configuration: return the base configuration." |
Lines 229-235
subtest '_load_configuration' => sub {
Link Here
|
229 |
limits => {}, |
229 |
limits => {}, |
230 |
digital_recipients => {}, |
230 |
digital_recipients => {}, |
231 |
prefixes => {}, |
231 |
prefixes => {}, |
232 |
partner_code => 'ILLLIBS', |
232 |
partner_code => 'IL', |
233 |
raw_config => { backend_directory => '/tmp/' }, |
233 |
raw_config => { backend_directory => '/tmp/' }, |
234 |
}, |
234 |
}, |
235 |
"load_configuration: return the correct backend_dir." |
235 |
"load_configuration: return the correct backend_dir." |
Lines 255-261
subtest '_load_configuration' => sub {
Link Here
|
255 |
limits => { branch => { 1 => { method => 'annual', count => 1 } } }, |
255 |
limits => { branch => { 1 => { method => 'annual', count => 1 } } }, |
256 |
digital_recipients => { branch => { 3 => 'branch' } }, |
256 |
digital_recipients => { branch => { 3 => 'branch' } }, |
257 |
prefixes => { branch => { 2 => '2-prefix' } }, |
257 |
prefixes => { branch => { 2 => '2-prefix' } }, |
258 |
partner_code => 'ILLLIBS', |
258 |
partner_code => 'IL', |
259 |
raw_config => $xml_config, |
259 |
raw_config => $xml_config, |
260 |
}, |
260 |
}, |
261 |
"load_configuration: multi branch config parsed correctly." |
261 |
"load_configuration: multi branch config parsed correctly." |
Lines 281-287
subtest '_load_configuration' => sub {
Link Here
|
281 |
limits => { branch => { 1 => { method => 'annual', count => 1 } } }, |
281 |
limits => { branch => { 1 => { method => 'annual', count => 1 } } }, |
282 |
digital_recipients => { branch => { 1 => 'branch' } }, |
282 |
digital_recipients => { branch => { 1 => 'branch' } }, |
283 |
prefixes => { branch => { 1 => '2-prefix' } }, |
283 |
prefixes => { branch => { 1 => '2-prefix' } }, |
284 |
partner_code => 'ILLLIBS', |
284 |
partner_code => 'IL', |
285 |
raw_config => $xml_config, |
285 |
raw_config => $xml_config, |
286 |
}, |
286 |
}, |
287 |
"load_configuration: single branch config parsed correctly." |
287 |
"load_configuration: single branch config parsed correctly." |
Lines 307-313
subtest '_load_configuration' => sub {
Link Here
|
307 |
limits => { brw_cat => { A => { method => 'annual', count => 1 } } }, |
307 |
limits => { brw_cat => { A => { method => 'annual', count => 1 } } }, |
308 |
digital_recipients => { brw_cat => { C => 'branch' } }, |
308 |
digital_recipients => { brw_cat => { C => 'branch' } }, |
309 |
prefixes => { brw_cat => { B => '2-prefix' } }, |
309 |
prefixes => { brw_cat => { B => '2-prefix' } }, |
310 |
partner_code => 'ILLLIBS', |
310 |
partner_code => 'IL', |
311 |
raw_config => $xml_config, |
311 |
raw_config => $xml_config, |
312 |
}, |
312 |
}, |
313 |
"load_configuration: multi borrower_category config parsed correctly." |
313 |
"load_configuration: multi borrower_category config parsed correctly." |
Lines 333-339
subtest '_load_configuration' => sub {
Link Here
|
333 |
limits => { brw_cat => { 1 => { method => 'annual', count => 1 } } }, |
333 |
limits => { brw_cat => { 1 => { method => 'annual', count => 1 } } }, |
334 |
digital_recipients => { brw_cat => { 1 => 'branch' } }, |
334 |
digital_recipients => { brw_cat => { 1 => 'branch' } }, |
335 |
prefixes => { brw_cat => { 1 => '2-prefix' } }, |
335 |
prefixes => { brw_cat => { 1 => '2-prefix' } }, |
336 |
partner_code => 'ILLLIBS', |
336 |
partner_code => 'IL', |
337 |
raw_config => $xml_config, |
337 |
raw_config => $xml_config, |
338 |
}, |
338 |
}, |
339 |
"load_configuration: single borrower_category config parsed correctly." |
339 |
"load_configuration: single borrower_category config parsed correctly." |
Lines 357-363
subtest '_load_configuration' => sub {
Link Here
|
357 |
limits => { default => { method => 'annual', count => 1 } }, |
357 |
limits => { default => { method => 'annual', count => 1 } }, |
358 |
digital_recipients => { default => 'branch' }, |
358 |
digital_recipients => { default => 'branch' }, |
359 |
prefixes => { default => '2-prefix' }, |
359 |
prefixes => { default => '2-prefix' }, |
360 |
partner_code => 'ILLLIBS', |
360 |
partner_code => 'IL', |
361 |
raw_config => $xml_config, |
361 |
raw_config => $xml_config, |
362 |
}, |
362 |
}, |
363 |
"load_configuration: parse the default configuration." |
363 |
"load_configuration: parse the default configuration." |
Lines 380-386
subtest '_load_configuration' => sub {
Link Here
|
380 |
limits => {}, |
380 |
limits => {}, |
381 |
digital_recipients => {}, |
381 |
digital_recipients => {}, |
382 |
prefixes => {}, |
382 |
prefixes => {}, |
383 |
partner_code => 'ILLLIBS', |
383 |
partner_code => 'IL', |
384 |
raw_config => $xml_config, |
384 |
raw_config => $xml_config, |
385 |
}, |
385 |
}, |
386 |
"load_configuration: parse censorship settings configuration." |
386 |
"load_configuration: parse censorship settings configuration." |
387 |
- |
|
|