From 2959b9c893b34266e0ce35cc289e6226a60b2888 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 5 Nov 2013 16:25:56 +0100 Subject: [PATCH] Bug 8918: Add a unit test for GetReserveNextRank Content-Type: text/plain; charset=utf-8 Rebased on January 29, 2014 (marcelr) Added text on the two 'is'-statements. --- t/db_dependent/Reserves.t | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index db82296..43c7a53 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -2,7 +2,7 @@ use Modern::Perl; -use Test::More tests => 23; +use Test::More tests => 25; use MARC::Record; use DateTime::Duration; @@ -317,6 +317,15 @@ ModReserveAffect( $itemnumber, $requesters{'CPL'} , 0); #confirm hold is(defined $results[3]?1:0, 1, 'GetReservesFromItemnumber returns a future wait (confirmed future hold)'); # End of tests for bug 9788 +# Test GetReserveNextRank (bug 8918) +my $rank = C4::Reserves::GetReserveNextRank($bibnum2); +is($rank, 4, 'GetReserveNextRank should return rank 4'); +AddReserve('CPL', $requesters{'CPL'}, $bibnum2, $constraint, $bibitems, undef, + $resdate, $expdate, $notes, $title); +$rank = C4::Reserves::GetReserveNextRank($bibnum2); +is($rank, 5, 'GetReserveNextRank should return rank 5'); +# End of test GetReserveNextRank + $dbh->rollback; sub count_hold_print_messages { -- 1.7.7.6