|
Lines 918-924
subtest 'ChargeReserveFee tests' => sub {
Link Here
|
| 918 |
}; |
918 |
}; |
| 919 |
|
919 |
|
| 920 |
subtest 'reserves.item_level_hold' => sub { |
920 |
subtest 'reserves.item_level_hold' => sub { |
| 921 |
plan tests => 3; |
921 |
plan tests => 4; |
| 922 |
|
922 |
|
| 923 |
my $item = $builder->build_sample_item; |
923 |
my $item = $builder->build_sample_item; |
| 924 |
my $patron = $builder->build_object( |
924 |
my $patron = $builder->build_object( |
|
Lines 1074-1079
subtest 'reserves.item_level_hold' => sub {
Link Here
|
| 1074 |
is( $canreserve->{status}, 'OK', |
1074 |
is( $canreserve->{status}, 'OK', |
| 1075 |
'item-level holds should be possible with opacitemholds set to "Yes"' ); |
1075 |
'item-level holds should be possible with opacitemholds set to "Yes"' ); |
| 1076 |
}; |
1076 |
}; |
|
|
1077 |
|
| 1078 |
subtest 'test opacitemholds rules in staff context' => sub { |
| 1079 |
plan tests => 2; |
| 1080 |
|
| 1081 |
Koha::CirculationRules->set_rules( |
| 1082 |
{ |
| 1083 |
branchcode => undef, |
| 1084 |
categorycode => undef, |
| 1085 |
itemtype => undef, |
| 1086 |
rules => { |
| 1087 |
reservesallowed => 25, |
| 1088 |
opacitemholds => 'N', |
| 1089 |
} |
| 1090 |
} |
| 1091 |
); |
| 1092 |
|
| 1093 |
my $canreserve = C4::Reserves::CanBookBeReserved( |
| 1094 |
$patron->borrowernumber, |
| 1095 |
$item->biblionumber, |
| 1096 |
undef, |
| 1097 |
{ context => 'staff' } |
| 1098 |
); |
| 1099 |
|
| 1100 |
is( $canreserve->{status}, 'OK', |
| 1101 |
'record-level holds should be possible with opacitemholds set to "No"' ); |
| 1102 |
|
| 1103 |
$canreserve = C4::Reserves::CanItemBeReserved( |
| 1104 |
$patron->borrowernumber, |
| 1105 |
$item->itemnumber, |
| 1106 |
undef, |
| 1107 |
{ context => 'staff' } |
| 1108 |
); |
| 1109 |
|
| 1110 |
is( $canreserve->{status}, 'OK', |
| 1111 |
'item-level holds should still be possible in staff context, even with opacitemholds set to "No"' ); |
| 1112 |
}; |
| 1077 |
}; |
1113 |
}; |
| 1078 |
|
1114 |
|
| 1079 |
subtest 'MoveReserve additional test' => sub { |
1115 |
subtest 'MoveReserve additional test' => sub { |
| 1080 |
- |
|
|