Bugzilla – Attachment 87282 Details for
Bug 17978
Include 'Next available'/title level holds in holds count when placing holds (opac and staff)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17978: Unit tests for changes
Bug-17978-Unit-tests-for-changes.patch (text/plain), 2.29 KB, created by
Martin Renvoize (ashimema)
on 2019-04-01 14:15:59 UTC
(
hide
)
Description:
Bug 17978: Unit tests for changes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-04-01 14:15:59 UTC
Size:
2.29 KB
patch
obsolete
>From b1e1660fae7bf22bcbabb94c9748e1fc6ea9411d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 24 Dec 2018 15:59:22 +0000 >Subject: [PATCH] Bug 17978: Unit tests for changes > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Holds.t | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 7af21266ce..e212744b43 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -7,7 +7,7 @@ use t::lib::TestBuilder; > > use C4::Context; > >-use Test::More tests => 57; >+use Test::More tests => 58; > use MARC::Record; > > use C4::Biblio; >@@ -413,6 +413,13 @@ my $res_id = AddReserve( $branch_1, $borrowernumbers[0], $biblio->biblionumber, > is( CanItemBeReserved( $borrowernumbers[0], $itemnumber )->{status}, > 'tooManyReserves', 'Patron cannot reserve item with hold limit of 1, 1 bib level hold placed' ); > >+ #results should be the same for both ReservesControlBranch settings >+t::lib::Mocks::mock_preference( 'ReservesControlBranch', 'ItemHomeLibrary' ); >+is( CanItemBeReserved( $borrowernumbers[0], $itemnumber )->{status}, >+ 'tooManyReserves', 'Patron cannot reserve item with hold limit of 1, 1 bib level hold placed' ); >+#reset for further tests >+t::lib::Mocks::mock_preference( 'ReservesControlBranch', 'PatronLibrary' ); >+ > subtest 'Test max_holds per library/patron category' => sub { > plan tests => 6; > >@@ -533,7 +540,7 @@ $schema->storage->txn_rollback; > > subtest 'CanItemBeReserved / holds_per_day tests' => sub { > >- plan tests => 9; >+ plan tests => 10; > > $schema->storage->txn_begin; > >@@ -653,6 +660,13 @@ subtest 'CanItemBeReserved / holds_per_day tests' => sub { > { status => 'tooManyReserves', limit => 3 }, > 'Unlimited daily holds, but reached reservesallowed' > ); >+ #results should be the same for both ReservesControlBranch settings >+ t::lib::Mocks::mock_preference('ReservesControlBranch', 'ItemHomeLibrary'); >+ is_deeply( >+ CanItemBeReserved( $patron->borrowernumber, $itemnumber_3 ), >+ { status => 'tooManyReserves', limit => 3 }, >+ 'Unlimited daily holds, but reached reservesallowed' >+ ); > > $schema->storage->txn_rollback; > }; >-- >2.20.1
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 17978
:
69927
|
72547
|
73161
|
83476
|
83477
|
86829
|
86830
|
86831
|
87280
|
87281
| 87282