Bugzilla – Attachment 50131 Details for
Bug 15757
Hard coded due loan/renewal period of 21 days if no circ rule found in C4::Circulation::GetLoanLength
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[ISGNED-OFF] Bug 15757: Add one test for GetLoanLength
ISGNED-OFF-Bug-15757-Add-one-test-for-GetLoanLengt.patch (text/plain), 2.76 KB, created by
Bernardo Gonzalez Kriegel
on 2016-04-11 19:25:56 UTC
(
hide
)
Description:
[ISGNED-OFF] Bug 15757: Add one test for GetLoanLength
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2016-04-11 19:25:56 UTC
Size:
2.76 KB
patch
obsolete
>From b479fc7f05967ccf8029d75ef6857182e0e1f757 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Apr 2016 09:44:51 +0100 >Subject: [PATCH] [ISGNED-OFF] Bug 15757: Add one test for GetLoanLength > >The usual call (3 params) of this subroutine was not tested. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > t/db_dependent/Circulation_Issuingrule.t | 21 +++++++++++++++------ > 1 file changed, 15 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Circulation_Issuingrule.t b/t/db_dependent/Circulation_Issuingrule.t >index 6e75672..89bdf8e 100644 >--- a/t/db_dependent/Circulation_Issuingrule.t >+++ b/t/db_dependent/Circulation_Issuingrule.t >@@ -6,7 +6,7 @@ use DateTime; > use Koha::DateUtils; > use Koha::Library; > >-use Test::More tests => 9; >+use Test::More tests => 10; > > BEGIN { > use_ok('C4::Circulation'); >@@ -113,7 +113,7 @@ my $sampleissuingrule1 = { > maxissueqty => 5, > maxonsiteissueqty => 4, > finedays => 0, >- lengthunit => 'Null', >+ lengthunit => 'days', > renewalperiod => 5, > norenewalbefore => 6, > auto_renew => 0, >@@ -148,7 +148,7 @@ my $sampleissuingrule2 = { > auto_renew => 0, > reservesallowed => 'Null', > issuelength => 2, >- lengthunit => 'Null', >+ lengthunit => 'days', > hardduedate => 2, > hardduedatecompare => 'Null', > fine => 'Null', >@@ -179,7 +179,7 @@ my $sampleissuingrule3 = { > auto_renew => 0, > reservesallowed => 'Null', > issuelength => 3, >- lengthunit => 'Null', >+ lengthunit => 'days', > hardduedate => 3, > hardduedatecompare => 'Null', > fine => 'Null', >@@ -340,7 +340,7 @@ is_deeply( > $samplecat->{categorycode}, > 'BOOK', $samplebranch1->{branchcode} > ), >- { issuelength => 5, lengthunit => 'Null', renewalperiod => 5 }, >+ { issuelength => 5, lengthunit => 'days', renewalperiod => 5 }, > "GetLoanLength" > ); > is_deeply( >@@ -377,8 +377,17 @@ is_deeply( > renewalperiod => 21, > lengthunit => 'days', > }, >- "With only one parameter, GetLoanLength returns hardcoded values" >+ "With only two parameters, GetLoanLength returns hardcoded values" > ); #NOTE : is that really what is expected? >+is_deeply( >+ C4::Circulation::GetLoanLength( $samplecat->{categorycode}, 'BOOK', $samplebranch1->{branchcode} ), >+ { >+ issuelength => 5, >+ renewalperiod => 5, >+ lengthunit => 'days', >+ }, >+ "With the correct number of parameters, GetLoanLength returns the expected values" >+); > > #Test GetHardDueDate > my @hardduedate = C4::Circulation::GetHardDueDate( $samplecat->{categorycode}, >-- >1.9.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 15757
:
50013
|
50014
|
50015
|
50029
|
50131
|
50132
|
50133
|
50513
|
50514
|
50515
|
50516