Lines 125-133
subtest 'set_pickup_location() tests' => sub {
Link Here
|
125 |
$item_hold->discard_changes; |
125 |
$item_hold->discard_changes; |
126 |
is( $item_hold->branchcode, $library_3->branchcode, 'branchcode remains untouched' ); |
126 |
is( $item_hold->branchcode, $library_3->branchcode, 'branchcode remains untouched' ); |
127 |
|
127 |
|
128 |
$item_hold->set_pickup_location({ library_id => $library_1->branchcode, override => 1 }); |
128 |
$item_hold->set_pickup_location({ library_id => $library_1->branchcode, force => 1 }); |
129 |
$item_hold->discard_changes; |
129 |
$item_hold->discard_changes; |
130 |
is( $item_hold->branchcode, $library_1->branchcode, 'branchcode changed because of \'override\'' ); |
130 |
is( $item_hold->branchcode, $library_1->branchcode, 'branchcode changed because of \'force\'' ); |
131 |
|
131 |
|
132 |
$ret = $item_hold->set_pickup_location({ library_id => $library_2->id }); |
132 |
$ret = $item_hold->set_pickup_location({ library_id => $library_2->id }); |
133 |
is( ref($ret), 'Koha::Hold', 'self is returned' ); |
133 |
is( ref($ret), 'Koha::Hold', 'self is returned' ); |
134 |
- |
|
|