|
Lines 454-460
subtest 'Holds test' => sub {
Link Here
|
| 454 |
|
454 |
|
| 455 |
subtest 'Holds test for branch transfer limits' => sub { |
455 |
subtest 'Holds test for branch transfer limits' => sub { |
| 456 |
|
456 |
|
| 457 |
plan tests => 4; |
457 |
plan tests => 6; |
| 458 |
|
458 |
|
| 459 |
$schema->storage->txn_begin; |
459 |
$schema->storage->txn_begin; |
| 460 |
|
460 |
|
|
Lines 536-546
subtest 'Holds test for branch transfer limits' => sub {
Link Here
|
| 536 |
|
536 |
|
| 537 |
$reply = C4::ILSDI::Services::HoldItem( $query ); |
537 |
$reply = C4::ILSDI::Services::HoldItem( $query ); |
| 538 |
is( $reply->{code}, undef, "Item hold, Item can be transferred" ); |
538 |
is( $reply->{code}, undef, "Item hold, Item can be transferred" ); |
|
|
539 |
my $hold = Koha::Holds->search({ itemnumber => $item->{itemnumber}, borrowernumber => $patron->{borrowernumber} })->next; |
| 540 |
isnt( $hold->branchcode, undef, 'The library id is correctly set' ); |
| 539 |
|
541 |
|
| 540 |
Koha::Holds->search()->delete(); |
542 |
Koha::Holds->search()->delete(); |
| 541 |
|
543 |
|
| 542 |
$reply = C4::ILSDI::Services::HoldTitle( $query ); |
544 |
$reply = C4::ILSDI::Services::HoldTitle( $query ); |
| 543 |
is( $reply->{code}, undef, "Record hold, Item con be transferred" ); |
545 |
is( $reply->{code}, undef, "Record hold, Item con be transferred" ); |
|
|
546 |
$hold = Koha::Holds->search({ biblionumber => $biblio->{biblionumber}, borrowernumber => $patron->{borrowernumber} })->next; |
| 547 |
isnt( $hold->branchcode, undef, 'The library id is correctly set' ); |
| 544 |
|
548 |
|
| 545 |
$schema->storage->txn_rollback; |
549 |
$schema->storage->txn_rollback; |
| 546 |
}; |
550 |
}; |