Bugzilla – Attachment 135941 Details for
Bug 12630
Prioritizing "Hold starts on date" -holds causes all other holds to be prioritized as well!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12630: Add regression tests
Bug-12630-Add-regression-tests.patch (text/plain), 2.12 KB, created by
Nick Clemens
on 2022-06-10 15:01:59 UTC
(
hide
)
Description:
Bug 12630: Add regression tests
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2022-06-10 15:01:59 UTC
Size:
2.12 KB
patch
obsolete
>From 0943b3bf1413fbd096a27fd6f924c117243b5674 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 5 Nov 2014 10:32:21 +0100 >Subject: [PATCH] Bug 12630: Add regression tests > >Verify that the 2 tests failed before applying this patch and return >green after. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/Reserves.t | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 3636c1b082..a001bc8d39 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 73; >+use Test::More tests => 75; > use Test::MockModule; > use Test::Warn; > >@@ -518,6 +518,31 @@ $p = C4::Reserves::CalculatePriority($bibnum, $resdate); > is($p, 3, 'CalculatePriority should now return priority 3'); > # End of tests for bug 8918 > >+# regression test for bug 12630 >+# Now there are 2 reserves on $bibnum >+t::lib::Mocks::mock_preference('AllowHoldDateInFuture', 1); >+my $borrowernumber_tmp_1 = AddMember( >+ firstname => 'my firstname tmp 1', >+ surname => 'my surname tmp 1', >+ categorycode => 'S', >+ branchcode => 'CPL', >+); >+my $borrowernumber_tmp_2 = AddMember( >+ firstname => 'my firstname tmp 2', >+ surname => 'my surname tmp 2', >+ categorycode => 'S', >+ branchcode => 'CPL', >+); >+my $date_in_future = dt_from_string(); >+$date_in_future = $date_in_future->add_duration(DateTime::Duration->new(days => 1)); >+AddReserve('CPL', $borrowernumber_tmp_1, $bibnum, undef, undef, 3, output_pref($date_in_future)); >+AddReserve('CPL', $borrowernumber_tmp_2, $bibnum, undef, undef, 4); >+my @r1 = GetReservesFromBorrowernumber( $borrowernumber_tmp_1 ); >+my @r2 = GetReservesFromBorrowernumber( $borrowernumber_tmp_2 ); >+is( $r1[0]->{priority}, 3, 'priority for hold in future should be correct'); >+is( $r2[0]->{priority}, 4, 'priority for hold not in future should be correct'); >+# end of tests for bug 12630 >+ > # Tests for cancel reserves by users from OPAC. > $dbh->do('DELETE FROM reserves', undef, ($bibnum)); > AddReserve( >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12630
:
29962
|
31140
|
31141
|
33238
|
33239
|
33240
|
135939
|
135940
| 135941 |
135942