Lines 1080-1086
subtest 'RevertWaitingStatus' => sub {
Link Here
|
1080 |
|
1080 |
|
1081 |
subtest 'CheckReserves additional test' => sub { |
1081 |
subtest 'CheckReserves additional test' => sub { |
1082 |
|
1082 |
|
1083 |
plan tests => 3; |
1083 |
plan tests => 6; |
1084 |
|
1084 |
|
1085 |
my $biblio = $builder->build_sample_biblio(); |
1085 |
my $biblio = $builder->build_sample_biblio(); |
1086 |
my $itype = $builder->build_object({ class => "Koha::ItemTypes", value => { notforloan => 0 } }); |
1086 |
my $itype = $builder->build_object({ class => "Koha::ItemTypes", value => { notforloan => 0 } }); |
Lines 1134-1139
subtest 'CheckReserves additional test' => sub {
Link Here
|
1134 |
} |
1134 |
} |
1135 |
}); |
1135 |
}); |
1136 |
|
1136 |
|
|
|
1137 |
# We set one reserve in transit - equivalent to checking it in at another branch and confirming transfer |
1137 |
ModReserveAffect( $item_1->itemnumber, $reserve1->borrowernumber, 1, $reserve1->reserve_id ); |
1138 |
ModReserveAffect( $item_1->itemnumber, $reserve1->borrowernumber, 1, $reserve1->reserve_id ); |
1138 |
my ($status, $matched_reserve, $possible_reserves) = CheckReserves($item_1->itemnumber); |
1139 |
my ($status, $matched_reserve, $possible_reserves) = CheckReserves($item_1->itemnumber); |
1139 |
|
1140 |
|
Lines 1141-1146
subtest 'CheckReserves additional test' => sub {
Link Here
|
1141 |
is( $matched_reserve->{reserve_id}, $reserve1->reserve_id, "We got the Transit reserve"); |
1142 |
is( $matched_reserve->{reserve_id}, $reserve1->reserve_id, "We got the Transit reserve"); |
1142 |
is( scalar @$possible_reserves, 1, 'We only get the one matched'); |
1143 |
is( scalar @$possible_reserves, 1, 'We only get the one matched'); |
1143 |
|
1144 |
|
|
|
1145 |
|
1146 |
# We set the reserve to waiting - equivalent to checking it in at pickup location and confirming |
1147 |
ModReserveAffect( $item_1->itemnumber, $reserve1->borrowernumber, 0, $reserve1->reserve_id ); |
1148 |
($status, $matched_reserve, $possible_reserves) = CheckReserves($item_1->itemnumber); |
1149 |
|
1150 |
is( $status, 'Waiting', "We found a reserve" ); |
1151 |
is( $matched_reserve->{reserve_id}, $reserve1->reserve_id, "We got the Waiting reserve"); |
1152 |
is( scalar @$possible_reserves, 1, 'We only get the one matched'); |
1153 |
|
1144 |
}; |
1154 |
}; |
1145 |
|
1155 |
|
1146 |
sub count_hold_print_messages { |
1156 |
sub count_hold_print_messages { |
1147 |
- |
|
|