View | Details | Raw Unified | Return to bug 24769
Collapse All | Expand All

(-)a/t/db_dependent/ILSDI_Services.t (-1 / +5 lines)
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
    is( $hold->branchcode, $pickup_branch->{branchcode}, '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
    is( $hold->branchcode, $pickup_branch->{branchcode}, 'The library id is correctly set' );
544
548
545
    $schema->storage->txn_rollback;
549
    $schema->storage->txn_rollback;
546
};
550
};
(-)a/t/db_dependent/SIP/Transaction.t (-3 / +4 lines)
Lines 209-215 subtest cancel_hold => sub { Link Here
209
};
209
};
210
210
211
subtest do_hold => sub {
211
subtest do_hold => sub {
212
    plan tests => 7;
212
    plan tests => 8;
213
213
214
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
214
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
215
    my $patron_1 = $builder->build_object(
215
    my $patron_1 = $builder->build_object(
Lines 265-271 subtest do_hold => sub { Link Here
265
    my $hold = $transaction->do_hold();
265
    my $hold = $transaction->do_hold();
266
    is( $item->biblio->holds->count(), 2, "Bib has 2 holds" );
266
    is( $item->biblio->holds->count(), 2, "Bib has 2 holds" );
267
267
268
    is( $patron_2->holds->next->priority, 2, 'Hold placed from SIP should have a correct priority of 2');
268
    my $THE_hold = $patron_2->holds->next;
269
    is( $THE_hold->priority, 2, 'Hold placed from SIP should have a correct priority of 2');
270
    is( $THE_hold->branchcode, $patron_2->branchcode, 'Hold placed from SIP should have the branchcode set' );
269
};
271
};
270
272
271
subtest do_checkin => sub {
273
subtest do_checkin => sub {
272
- 

Return to bug 24769