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

(-)a/t/db_dependent/Circulation_holdsqueue.t (-2 / +3 lines)
Lines 41-56 subtest 'AddIssue() and AddReturn() real-time holds queue tests' => sub { Link Here
41
    my $item    = $builder->build_sample_item({ library => $library->id });
41
    my $item    = $builder->build_sample_item({ library => $library->id });
42
42
43
    t::lib::Mocks::mock_userenv({ branchcode => $library->id });
43
    t::lib::Mocks::mock_userenv({ branchcode => $library->id });
44
    t::lib::Mocks::mock_preference( 'UpdateTotalIssuesOnCirc', 1 );
44
45
45
    my $action;
46
    my $action;
46
47
47
    my $mock = Test::MockModule->new('Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue');
48
    my $mock = Test::MockModule->new('Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue');
48
    $mock->mock( 'enqueue', sub {
49
    $mock->mock( 'enqueue', sub {
49
        my ( $self, $args ) = @_;
50
        my ( $self, $args ) = @_;
51
        my ($package, $filename, $line) = caller;
50
        is_deeply(
52
        is_deeply(
51
            $args->{biblio_ids},
53
            $args->{biblio_ids},
52
            [ $item->biblionumber ],
54
            [ $item->biblionumber ],
53
            "$action triggers a holds queue update for the related biblio"
55
            "$action triggers a holds queue update for the related biblio from $package"
54
        );
56
        );
55
    } );
57
    } );
56
58
57
- 

Return to bug 29346