Bugzilla – Attachment 67726 Details for
Bug 19423
DecreaseLoanHighHolds.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly
Bug-19423-Prevent-DecreaseLoanHighHoldst-to-fail-r.patch (text/plain), 2.09 KB, created by
Jonathan Druart
on 2017-10-06 15:32:24 UTC
(
hide
)
Description:
Bug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-06 15:32:24 UTC
Size:
2.09 KB
patch
obsolete
>From 090b450a502340e3d03b5ee6a075cc92e647aada Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 6 Oct 2017 12:30:18 -0300 >Subject: [PATCH] Bug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly > >CanBookBeIssued returns STATS if categorycode is X > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/DecreaseLoanHighHolds.t | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/DecreaseLoanHighHolds.t b/t/db_dependent/DecreaseLoanHighHolds.t >index 00d1b9fd67..49d3cd8492 100755 >--- a/t/db_dependent/DecreaseLoanHighHolds.t >+++ b/t/db_dependent/DecreaseLoanHighHolds.t >@@ -51,10 +51,11 @@ C4::Context->_new_userenv('xxx'); > C4::Context->set_userenv( 0, 0, 0, 'firstname', 'surname', $library->{branchcode}, 'Midway Public Library', '', '', '' ); > is( C4::Context->userenv->{branch}, $library->{branchcode}, 'userenv set' ); > >+my $patron_category = $builder->build({ source => 'Category', value => { categorycode => 'NOT_X', category_type => 'P', enrolmentfee => 0 } }); > my @patrons; > for my $i ( 1 .. 20 ) { > my $patron = Koha::Patron->new( >- { cardnumber => $i, firstname => 'Kyle', surname => 'Hall', categorycode => $category->{categorycode}, branchcode => $library->{branchcode} } ) >+ { cardnumber => $i, firstname => 'Kyle', surname => 'Hall', categorycode => $category->{categorycode}, branchcode => $library->{branchcode}, categorycode => $patron_category->{categorycode}, } ) > ->store(); > push( @patrons, $patron ); > } >@@ -183,7 +184,7 @@ is( $data->{exceeded}, 1, "Should exceed threshold with one withdrawn item" ); > > t::lib::Mocks::mock_preference('CircControl', 'PatronLibrary'); > >-my ( undef, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode ); >+my ( $un, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode ); > ok( $needsconfirmation->{HIGHHOLDS}, "High holds checkout needs confirmation" ); > > ( undef, $needsconfirmation ) = CanBookBeIssued( $patron_hr, $item->barcode, undef, undef, undef, { override_high_holds => 1 } ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19423
: 67726