From 283eca9be85b6fc303e1649f3cae00436c2d08f0 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 --- t/db_dependent/Reserves.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index ad50619..dcf6f30 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -2,7 +2,7 @@ use Modern::Perl; -use Test::More tests => 17; +use Test::More tests => 19; use MARC::Record; use DateTime::Duration; @@ -266,4 +266,13 @@ is(exists $messages->{ResFound}?1:0, 1, 'AddReturn considers future reserve with my $letter = ReserveSlip('CPL', $requesters{'CPL'}, $bibnum); ok(defined($letter), 'can successfully generate hold slip (bug 10949)'); +# Test GetReserveNextRank +my $rank = C4::Reserves::GetReserveNextRank($bibnum2); +is($rank, 4); +AddReserve('CPL', $requesters{'CPL'}, $bibnum2, $constraint, $bibitems, undef, + $resdate, $expdate, $notes, $title); +$rank = C4::Reserves::GetReserveNextRank($bibnum2); +is($rank, 5); +# End of test GetReserveNextRank + $dbh->rollback; -- 1.7.10.4