Bugzilla – Attachment 108219 Details for
Bug 19889
LocalHoldsPriority needs exclusions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19889: (follow-up) Add tests
Bug-19889-follow-up-Add-tests.patch (text/plain), 1.83 KB, created by
Agustín Moyano
on 2020-08-13 19:42:11 UTC
(
hide
)
Description:
Bug 19889: (follow-up) Add tests
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2020-08-13 19:42:11 UTC
Size:
1.83 KB
patch
obsolete
>From 05b48e72f44184053774211f31037f807e853fee Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 7 Aug 2020 11:17:59 +0200 >Subject: [PATCH] Bug 19889: (follow-up) Add tests > >--- > t/db_dependent/HoldsQueue.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 85cc94aec1..518f6d3fb4 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -1353,7 +1353,7 @@ subtest 'Trivial test for UpdateTransportCostMatrix' => sub { > }; > > subtest 'Excludes from local holds priority' => sub { >- plan tests => 5; >+ plan tests => 8; > > Koha::Holds->delete; > >@@ -1433,6 +1433,7 @@ subtest 'Excludes from local holds priority' => sub { > > my $queue_rs = $schema->resultset('TmpHoldsqueue'); > my $next = $queue_rs->next; >+ is($queue_rs->count, 1, 'Only 1 patron queueud' ); > is($next->borrowernumber, $local_patron_not_excluded->borrowernumber, 'Not excluded local patron is queued'); > > my $item2 = $builder->build_sample_item( >@@ -1445,6 +1446,7 @@ subtest 'Excludes from local holds priority' => sub { > C4::HoldsQueue::CreateQueue(); > > $queue_rs = $schema->resultset('TmpHoldsqueue'); >+ is( $queue_rs->count, 2, '2 patrons queued' ); > $next = $queue_rs->next; > is($next->borrowernumber, $local_patron_not_excluded->borrowernumber, 'Not excluded local patron is queued'); > $next = $queue_rs->next; >@@ -1455,6 +1457,7 @@ subtest 'Excludes from local holds priority' => sub { > C4::HoldsQueue::CreateQueue(); > > $queue_rs = $schema->resultset('TmpHoldsqueue'); >+ is( $queue_rs->count, 2, '2 patrons queued' ); > $next = $queue_rs->next; > is($next->borrowernumber, $other_patron->borrowernumber, 'Other patron is queued'); > $next = $queue_rs->next; >-- >2.25.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 19889
:
105715
|
105716
|
105717
|
105718
|
106435
|
106436
|
106437
|
106438
|
106439
|
106440
|
106441
|
106442
|
107180
|
107187
|
107188
|
107189
|
107190
|
107191
|
107192
|
107193
|
107194
|
107195
|
107196
|
107908
|
107909
|
107910
|
107911
|
107912
|
107913
|
107926
|
107927
|
107928
|
107929
|
107930
|
107931
|
107948
|
108213
|
108214
|
108215
|
108216
|
108217
|
108218
|
108219
|
108220
|
108593
|
108594
|
108595
|
108725
|
108726
|
108728
|
109131
|
109132
|
109285
|
109364
|
109419