Bugzilla – Attachment 41907 Details for
Bug 14337
AllowRenewalIfOtherItemsAvailable counts holdable not for loan items when checking renewability
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14337: Add 2 more tests to be complete
Bug-14337-Add-2-more-tests-to-be-complete.patch (text/plain), 2.89 KB, created by
Jonathan Druart
on 2015-08-25 11:48:38 UTC
(
hide
)
Description:
Bug 14337: Add 2 more tests to be complete
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-08-25 11:48:38 UTC
Size:
2.89 KB
patch
obsolete
>From 01944ba2edc969f639380abf3d8d93013b42385a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 25 Aug 2015 12:47:57 +0100 >Subject: [PATCH] Bug 14337: Add 2 more tests to be complete > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Circulation.t | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index c1b4b08..591c7e4 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -27,7 +27,7 @@ use C4::Overdues qw(UpdateFine); > use Koha::DateUtils; > use Koha::Database; > >-use Test::More tests => 65; >+use Test::More tests => 67; > > BEGIN { > use_ok('C4::Circulation'); >@@ -658,14 +658,25 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > undef, undef, undef > ); > >+ C4::Context->dbh->do("UPDATE issuingrules SET onshelfholds = 0"); >+ C4::Context->set_preference( 'AllowRenewalIfOtherItemsAvailable', 0 ); > ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $itemnumber1 ); >- is( $renewokay, 0, 'Bug 14337 - Verify the borrower cannot renew with a hold on the record' ); >+ is( $renewokay, 0, 'Bug 14337 - Verify the borrower cannot renew with a hold on the record if AllowRenewalIfOtherItemsAvailable and onshelfholds are disabled' ); > >- C4::Context->dbh->do("UPDATE issuingrules SET onshelfholds = 1"); >+ C4::Context->dbh->do("UPDATE issuingrules SET onshelfholds = 0"); > C4::Context->set_preference( 'AllowRenewalIfOtherItemsAvailable', 1 ); >+ ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $itemnumber1 ); >+ is( $renewokay, 0, 'Bug 14337 - Verify the borrower cannot renew with a hold on the record if AllowRenewalIfOtherItemsAvailable is enabled and onshelfholds is disabled' ); > >+ C4::Context->dbh->do("UPDATE issuingrules SET onshelfholds = 1"); >+ C4::Context->set_preference( 'AllowRenewalIfOtherItemsAvailable', 0 ); >+ ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $itemnumber1 ); >+ is( $renewokay, 0, 'Bug 14337 - Verify the borrower cannot renew with a hold on the record if AllowRenewalIfOtherItemsAvailable is disabled and onshelfhold is enabled' ); >+ >+ C4::Context->dbh->do("UPDATE issuingrules SET onshelfholds = 1"); >+ C4::Context->set_preference( 'AllowRenewalIfOtherItemsAvailable', 1 ); > ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $itemnumber1 ); >- is( $renewokay, 1, 'Bug 14337 - Verify the borrower can renew with a hold on the record if AllowRenewalIfOtherItemsAvailable is enabled' ); >+ is( $renewokay, 1, 'Bug 14337 - Verify the borrower can renew with a hold on the record if AllowRenewalIfOtherItemsAvailable and onshelfhold are enabled' ); > > # Setting item not checked out to be not for loan but holdable > ModItem({ notforloan => -1 }, $biblionumber, $itemnumber2); >-- >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 14337
:
39898
|
41262
|
41263
|
41569
|
41708
|
41709
|
41787
|
41788
|
41904
|
41905
|
41906
| 41907 |
50840
|
50841