From 67604b2d36a8b941d883b56e89efde7ac0ddd689 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Thu, 18 Oct 2018 03:43:33 +0000 Subject: [PATCH] Bug 19532: Fix t/db_dependent/Koha/Recalls.t Sponsored-By: Toi Ohomai Institute of Technology, New Zealand --- t/db_dependent/Koha/Recalls.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Recalls.t b/t/db_dependent/Koha/Recalls.t index 1b421ff..375371d 100644 --- a/t/db_dependent/Koha/Recalls.t +++ b/t/db_dependent/Koha/Recalls.t @@ -38,6 +38,7 @@ my $biblio = $builder->build( { source => 'Biblio' } ); my $itemtype = $builder->build( { source => 'Itemtype' } ); my $item = $builder->build( { source => 'Item', value => { biblionumber => $biblio->{biblionumber}, itype => $itemtype->{itemtype}, holdingbranch => $library->{branchcode} } } ); my $checkout = $builder->build( { source => 'Issue', value => { borrowernumber => 5, itemnumber => $item->{itemnumber} } } ); +my $nb_of_recalls = Koha::Recalls->search->count; # recall requested by second patron my $recall = Koha::Recall->new({ @@ -50,7 +51,7 @@ my $recall = Koha::Recall->new({ itemtype => $item->{itype}, })->store; -is( Koha::Recalls->search->count, 1, 'The one recall should be added' ); +is( Koha::Recalls->search->count, $nb_of_recalls + 1, 'The one recall should have be added' ); is( $recall->is_requested, 1, 'Recall status is set to R, requested' ); $recall->update({ status => 'O' }); -- 2.1.4