2 use strict; use warnings;
3 use Test::More tests => 180; # 15 orgs * 12 settings
4 use OpenILS::Utils::TestUtils;
5 use OpenILS::Application::AppUtils;
6 my $U = 'OpenILS::Application::AppUtils';
8 diag("Tests batch org setting retrieval");
10 my $script = OpenILS::Utils::TestUtils->new();
13 my $org_ids = [1 .. 15];
14 # All settings at time of writing. None of these have view perms.
16 circ.patron_search.diacritic_insensitive
17 circ.checkout_auto_renew_age
22 circ.booking_reservation.default_elbow_room
25 circ.hold_go_home_interval
30 # compare the values returned from the batch-by-org setting to the
31 # traditional setting value lookup call.
32 for my $setting (@settings) {
34 $U->ou_ancestor_setting_batch_by_org_insecure($org_ids, $setting);
36 for my $org_id (@$org_ids) {
37 my $value = $U->ou_ancestor_setting_value($org_id, $setting);
38 is($value, $batch_settings{$org_id}->{value},
39 "Value matches for setting $setting and org $org_id");