Bugzilla – Attachment 37376 Details for
Bug 13919
Renewal possible with item level hold on item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13919 - Unit Test
Bug-13919---Unit-Test.patch (text/plain), 2.10 KB, created by
Kyle M Hall (khall)
on 2015-03-30 14:18:11 UTC
(
hide
)
Description:
Bug 13919 - Unit Test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-03-30 14:18:11 UTC
Size:
2.10 KB
patch
obsolete
>From e785da705f1c28d3a941983ccf0fd354f3a86f2f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 30 Mar 2015 10:16:11 -0400 >Subject: [PATCH] Bug 13919 - Unit Test > >--- > t/db_dependent/Circulation.t | 19 +++++++++++++++++-- > 1 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 5b5a3e6..8037653 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -26,7 +26,7 @@ use C4::Reserves; > use Koha::DateUtils; > use Koha::Database; > >-use Test::More tests => 59; >+use Test::More tests => 60; > > BEGIN { > use_ok('C4::Circulation'); >@@ -297,9 +297,24 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); > ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber2); > is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); >+ >+ # Now let's add an item level hold, we should no longer be able to renew the item >+ my $hold = Koha::Database->new()->schema()->resultset('Reserve')->create( >+ { >+ borrowernumber => $hold_waiting_borrowernumber, >+ biblionumber => $biblionumber, >+ itemnumber => $itemnumber, >+ branchcode => $branch, >+ priority => 3, >+ } >+ ); >+ ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); >+ is( $renewokay, 0, 'Bug 13919 - Renewal possible with item level hold on item'); >+ $hold->delete(); >+ > # Now let's add a waiting hold on the 3rd item, it's no longer available tp check out by just anyone, so we should no longer > # be able to renew these items >- my $hold = Koha::Database->new()->schema()->resultset('Reserve')->create( >+ $hold = Koha::Database->new()->schema()->resultset('Reserve')->create( > { > borrowernumber => $hold_waiting_borrowernumber, > biblionumber => $biblionumber, >-- >1.7.2.5
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 13919
:
37376
|
37377
|
37721
|
37722
|
37729
|
38307
|
38308
|
38315
|
38377
|
38378
|
38379