From 153465687bcfa8d3debdb2fb6cf89e8c58f7d7cb 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 CalculatePriority Content-Type: text/plain; charset=utf-8 Rebased on January 29, 2014 (marcelr) Added text on the two 'is'-statements. Signed-off-by: Marcel de Rooy --- t/db_dependent/Reserves.t | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index db82296..7f43986 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,16 @@ 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 +# Tests for CalculatePriority (bug 8918) +my $p = C4::Reserves::CalculatePriority($bibnum2); +is($p, 4, 'CalculatePriority should now return priority 4'); +AddReserve('CPL', $requesters{'CPL'}, $bibnum2, + $constraint, $bibitems, $p, undef, $expdate, $notes, + $title, $checkitem, $found); +$p = C4::Reserves::CalculatePriority($bibnum2); +is($p, 5, 'CalculatePriority should now return priority 5'); +# End of tests for bug 8918 + $dbh->rollback; sub count_hold_print_messages { -- 1.7.7.6