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

(-)a/t/db_dependent/Circulation.t (-5 / +12 lines)
Lines 6138-6145 subtest 'Test CanBookBeIssued param ignore_reserves (Bug 35322)' => sub { Link Here
6138
6138
6139
    my $homebranch    = $builder->build( { source => 'Branch' } );
6139
    my $homebranch    = $builder->build( { source => 'Branch' } );
6140
    my $holdingbranch = $builder->build( { source => 'Branch' } );
6140
    my $holdingbranch = $builder->build( { source => 'Branch' } );
6141
    my $patron_1      = $builder->build_object( { class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } );
6141
    my $patron_1      = $builder->build_object(
6142
    my $patron_2      = $builder->build_object( { class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } );
6142
        { class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } );
6143
    my $patron_2 = $builder->build_object(
6144
        { class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } );
6143
6145
6144
    my $item = $builder->build_sample_item(
6146
    my $item = $builder->build_sample_item(
6145
        {
6147
        {
Lines 6182-6192 subtest 'Test CanBookBeIssued param ignore_reserves (Bug 35322)' => sub { Link Here
6182
    set_userenv($holdingbranch);
6184
    set_userenv($holdingbranch);
6183
6185
6184
    my ( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode, undef, undef, 0 );
6186
    my ( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode, undef, undef, 0 );
6185
    is( keys(%$error) + keys(%$alerts), 0, 'There should not be any errors or alerts (impossible)' . str($error, $question, $alerts) );
6187
    is(
6188
        keys(%$error) + keys(%$alerts), 0,
6189
        'There should not be any errors or alerts (impossible)' . str( $error, $question, $alerts )
6190
    );
6186
    is( exists $question->{RESERVE_WAITING}, 1, 'RESERVE_WAITING is set' );
6191
    is( exists $question->{RESERVE_WAITING}, 1, 'RESERVE_WAITING is set' );
6187
6192
6188
    ( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode, undef, undef, 1 );
6193
    ( $error, $question, $alerts ) = CanBookBeIssued( $patron_2, $item->barcode, undef, undef, 1 );
6189
    is( keys(%$error) + keys(%$alerts), 0, 'There should not be any errors or alerts (impossible)' . str($error, $question, $alerts) );
6194
    is(
6195
        keys(%$error) + keys(%$alerts), 0,
6196
        'There should not be any errors or alerts (impossible)' . str( $error, $question, $alerts )
6197
    );
6190
    isnt( exists $question->{RESERVE_WAITING}, 1, 'RESERVE_WAITING is not set' );
6198
    isnt( exists $question->{RESERVE_WAITING}, 1, 'RESERVE_WAITING is not set' );
6191
6199
6192
};
6200
};
6193
- 

Return to bug 35322