Bugzilla – Attachment 32271 Details for
Bug 12803
Add ability to skip closed libraries when generating the holds queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12803: tidy up some tests
Bug-12803-tidy-up-some-tests.patch (text/plain), 2.05 KB, created by
Jonathan Druart
on 2014-10-11 20:11:46 UTC
(
hide
)
Description:
Bug 12803: tidy up some tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-10-11 20:11:46 UTC
Size:
2.05 KB
patch
obsolete
>From 2da49caf078279eb7d3b9129f7e5aed06f7a32bc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Sat, 11 Oct 2014 22:11:15 +0200 >Subject: [PATCH] Bug 12803: tidy up some tests > >--- > t/db_dependent/HoldsQueue.t | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 6fc6771..a73eac1 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -307,15 +307,14 @@ C4::Calendar->new( branchcode => 'MPL' )->insert_single_holiday( > ); > C4::HoldsQueue::CreateQueue(); > $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); >-ok( @$holds_queue == 1, "Holds not filled with items from closed libraries" ); >+is( scalar( @$holds_queue ), 1, "Holds not filled with items from closed libraries" ); > C4::Context->set_preference('HoldsQueueSkipClosed', 0); > > $dbh->do("DELETE FROM default_circ_rules"); > $dbh->do("INSERT INTO default_circ_rules ( holdallowed ) VALUES ( 2 )"); > C4::HoldsQueue::CreateQueue(); > $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); >-ok( @$holds_queue == 3, "Holds queue filling correct number for holds for default holds policy 'from any library'" ); >-#warn "HOLDS QUEUE: " . Data::Dumper::Dumper( $holds_queue ); >+is( scalar( @$holds_queue ), 3, "Holds queue filling correct number for holds for default holds policy 'from any library'" ); > > # Test skipping hold picks for closed libraries without transport cost matrix > # At this point in the test, we have 3 rows in the holds queue >@@ -325,7 +324,7 @@ ok( @$holds_queue == 3, "Holds queue filling correct number for holds for defaul > C4::Context->set_preference( 'HoldsQueueSkipClosed', 1 ); > C4::HoldsQueue::CreateQueue(); > $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); >-ok( @$holds_queue == 2, "Holds not filled with items from closed libraries" ); >+is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed libraries" ); > > # Cleanup > $dbh->rollback; >-- >2.1.0
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 12803
:
31057
|
31060
|
31061
|
31062
|
31063
|
31630
|
31631
|
32046
|
32271
|
43509
|
43510
|
43511
|
43512
|
43610
|
43779
|
43833
|
43979
|
45569
|
45570
|
45571
|
45572
|
45573
|
45574
|
45575
|
45576
|
45638
|
45643
|
45644
|
46888
|
46889
|
46890
|
46891
|
46892
|
46893
|
46894
|
46895
|
47246
|
47247
|
48574
|
48575