Bugzilla – Attachment 55060 Details for
Bug 17229
ILS-DI HoldTitle and HoldItem should check if patron is expired
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17229: Add unit test for BlockExpiredPatronOpacActions check
Bug-17229-Add-unit-test-for-BlockExpiredPatronOpac.patch (text/plain), 1.80 KB, created by
Julian Maurice
on 2016-08-31 13:52:26 UTC
(
hide
)
Description:
Bug 17229: Add unit test for BlockExpiredPatronOpacActions check
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-08-31 13:52:26 UTC
Size:
1.80 KB
patch
obsolete
>From 4c72d9cbe4f0f812d65e410b25db5d17975ad5a2 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 31 Aug 2016 15:52:08 +0200 >Subject: [PATCH] Bug 17229: Add unit test for BlockExpiredPatronOpacActions > check > >--- > t/db_dependent/Holds.t | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index f9ddc46..355e865 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -8,7 +8,7 @@ use t::lib::TestBuilder; > use C4::Context; > use C4::Branch; > >-use Test::More tests => 60; >+use Test::More tests => 61; > use MARC::Record; > use C4::Biblio; > use C4::Items; >@@ -34,7 +34,12 @@ my $dbh = C4::Context->dbh; > my $branch_1 = $builder->build({ source => 'Branch' })->{ branchcode }; > my $branch_2 = $builder->build({ source => 'Branch' })->{ branchcode }; > >-my $category = $builder->build({ source => 'Category' }); >+my $category = $builder->build({ >+ source => 'Category', >+ value => { >+ BlockExpiredPatronOpacActions => -1, >+ }, >+}); > > my $borrowers_count = 5; > >@@ -473,6 +478,17 @@ my $res_id = AddReserve( $branch_1, $borrowernumbers[0], $bibnum, '', 1, ); > is( CanItemBeReserved( $borrowernumbers[0], $itemnumber ), > 'tooManyReserves', 'Patron cannot reserve item with hold limit of 1, 1 bib level hold placed' ); > >+my $expired_borrowernumber = AddMember( >+ firstname => 'Expired', >+ surname => 'Patron', >+ categorycode => $category->{categorycode}, >+ branchcode => $branch_1, >+ dateexpiry => '2000-01-01', >+); >+t::lib::Mocks::mock_preference('BlockExpiredPatronOpacActions', 1); >+is(CanItemBeReserved($expired_borrowernumber, $itemnumber), >+ 'expired', 'Expired patron cannot reserve'); >+ > > # Helper method to set up a Biblio. > sub create_helper_biblio { >-- >2.1.4
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 17229
:
55059
|
55060
|
62036
|
62037
|
67324
|
67325
|
70682
|
70683
|
72970
|
72971
|
85064
|
85065
|
85066
|
85070
|
85071
|
85072
|
85118
|
85883
|
89760
|
99701
|
99702
|
99703
|
99817
|
99818
|
99819
|
113741
|
113742
|
113743
|
115081
|
115082
|
115083
|
115411
|
115435