Lines 79-90
subtest 'transfer already at destination' => sub {
Link Here
|
79 |
# We are making sure there is no regression, feel free to change the behavior if needed. |
79 |
# We are making sure there is no regression, feel free to change the behavior if needed. |
80 |
# * Contrary to the POD, if ignore_reserves is not passed (or is false), any item reserve |
80 |
# * Contrary to the POD, if ignore_reserves is not passed (or is false), any item reserve |
81 |
# found will override all other measures that may prevent transfer and force a transfer. |
81 |
# found will override all other measures that may prevent transfer and force a transfer. |
82 |
AddReserve({ |
82 |
AddReserve( |
83 |
branchcode => $item->homebranch, |
83 |
$item->homebranch, |
84 |
borrowernumber => $patron->borrowernumber, |
84 |
$patron->borrowernumber, |
85 |
biblionumber => $item->biblionumber, |
85 |
$item->biblionumber, |
86 |
itemnumber => $item->itemnumber, |
86 |
undef, undef, undef, undef, undef, undef, |
87 |
}); |
87 |
$item->itemnumber, |
|
|
88 |
); |
88 |
|
89 |
|
89 |
($dotransfer, $messages ) = transferbook( $library->branchcode, $item->barcode ); |
90 |
($dotransfer, $messages ) = transferbook( $library->branchcode, $item->barcode ); |
90 |
is( $dotransfer, 1, 'Transfer of reserved item succeeded without ignore reserves' ); |
91 |
is( $dotransfer, 1, 'Transfer of reserved item succeeded without ignore reserves' ); |
Lines 126-137
subtest 'transfer an issued item' => sub {
Link Here
|
126 |
# We are making sure there is no regression, feel free to change the behavior if needed. |
127 |
# We are making sure there is no regression, feel free to change the behavior if needed. |
127 |
# * Contrary to the POD, if ignore_reserves is not passed (or is false), any item reserve |
128 |
# * Contrary to the POD, if ignore_reserves is not passed (or is false), any item reserve |
128 |
# found will override all other measures that may prevent transfer and force a transfer. |
129 |
# found will override all other measures that may prevent transfer and force a transfer. |
129 |
AddReserve({ |
130 |
AddReserve( |
130 |
branchcode => $item->homebranch, |
131 |
$item->homebranch, |
131 |
borrowernumber => $patron->borrowernumber, |
132 |
$patron->borrowernumber, |
132 |
biblionumber => $item->biblionumber, |
133 |
$item->biblionumber, |
133 |
itemnumber => $item->itemnumber, |
134 |
undef, undef, undef, undef, undef, undef, |
134 |
}); |
135 |
$item->itemnumber, |
|
|
136 |
); |
135 |
|
137 |
|
136 |
($dotransfer, $messages ) = transferbook( $library->branchcode, $item->barcode ); |
138 |
($dotransfer, $messages ) = transferbook( $library->branchcode, $item->barcode ); |
137 |
is( $dotransfer, 1, 'Transfer of reserved item succeeded without ignore reserves' ); |
139 |
is( $dotransfer, 1, 'Transfer of reserved item succeeded without ignore reserves' ); |
Lines 158-169
subtest 'ignore_reserves flag' => sub {
Link Here
|
158 |
} |
160 |
} |
159 |
); |
161 |
); |
160 |
|
162 |
|
161 |
AddReserve({ |
163 |
AddReserve( |
162 |
branchcode => $item->homebranch, |
164 |
$item->homebranch, |
163 |
borrowernumber => $patron->borrowernumber, |
165 |
$patron->borrowernumber, |
164 |
biblionumber => $item->biblionumber, |
166 |
$item->biblionumber, |
165 |
itemnumber => $item->itemnumber, |
167 |
undef, undef, undef, undef, undef, undef, |
166 |
}); |
168 |
$item->itemnumber, |
|
|
169 |
); |
167 |
|
170 |
|
168 |
# We are making sure there is no regression, feel free to change the behavior if needed. |
171 |
# We are making sure there is no regression, feel free to change the behavior if needed. |
169 |
# * Contrary to the POD, if ignore_reserves is not passed (or is false), any item reserve |
172 |
# * Contrary to the POD, if ignore_reserves is not passed (or is false), any item reserve |
170 |
- |
|
|