Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count
[koha.git] / t / db_dependent / Holds.t
index ad87b26..871d687 100755 (executable)
@@ -7,7 +7,7 @@ use t::lib::TestBuilder;
 
 use C4::Context;
 
-use Test::More tests => 58;
+use Test::More tests => 56;
 use MARC::Record;
 use C4::Biblio;
 use C4::Items;
@@ -127,9 +127,6 @@ $holds = $patron->holds;
 is( $holds->next->borrowernumber, $borrowernumbers[0], "Test Koha::Patron->holds");
 
 
-ok( GetReserveCount( $borrowernumbers[0] ), "Test GetReserveCount()" );
-
-
 CancelReserve({ 'reserve_id' => $reserve_id });
 $holds = $biblio->holds;
 is( $holds->count, $borrowers_count - 1, "Test CancelReserve()" );
@@ -211,11 +208,6 @@ ModReserveMinusPriority( $itemnumber, $reserve->{'reserve_id'} );
 $holds = $patron->holds;
 is( $holds->next->itemnumber, $itemnumber, "Test ModReserveMinusPriority()" );
 
-
-my $reserve2 = GetReserveInfo( $reserve->{'reserve_id'} );
-ok( $reserve->{'reserve_id'} eq $reserve2->{'reserve_id'}, "Test GetReserveInfo()" );
-
-
 $holds = $biblio->holds;
 $hold = $holds->next;
 AlterPriority( 'top', $hold->reserve_id );
@@ -323,7 +315,7 @@ my $reserveid2 = C4::Reserves::GetReserveId(
 
 CancelReserve({ reserve_id => $reserveid1 });
 
-$reserve2 = GetReserve( $reserveid2 );
+my $reserve2 = GetReserve( $reserveid2 );
 is( $reserve2->{priority}, 1, "After cancelreserve, the 2nd reserve becomes the first on the waiting list" );
 
 ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => $branch_1, holdingbranch => $branch_1 } , $bibnum);