Bugzilla – Attachment 57289 Details for
Bug 17575
Remove Circulation.t warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17575: Remove itemtype-related warnings from Circulation.t
SIGNED-OFF-Bug-17575-Remove-itemtype-related-warni.patch (text/plain), 6.06 KB, created by
Josef Moravec
on 2016-11-07 21:36:30 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17575: Remove itemtype-related warnings from Circulation.t
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-11-07 21:36:30 UTC
Size:
6.06 KB
patch
obsolete
>From 886781b60922fd7ea8ee038e327e2251c2cbc3a6 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 7 Nov 2016 16:00:21 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 17575: Remove itemtype-related warnings from > Circulation.t > >To test: >- Run: > $ prove t/db_dependent/Circulation.t >=> FAIL: Lots of warnings >- Apply the patch >- Run: > $ prove t/db_dependent/Circulation.t >=> SUCCESS: All green and no itemtype warnings >- Sign off :-D > >Sponsored-by: ByWater Solutions > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > t/db_dependent/Circulation.t | 38 ++++++++++++++++++++++++++++---------- > 1 file changed, 28 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 723c27b..0fe2872 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -54,6 +54,11 @@ my $library = $builder->build({ > my $library2 = $builder->build({ > source => 'Branch', > }); >+my $itemtype = $builder->build( >+ { source => 'Itemtype', >+ value => { notforloan => undef, rentalcharge => 0 } >+ } >+)->{itemtype}; > > my $CircControl = C4::Context->preference('CircControl'); > my $HomeOrHoldingBranch = C4::Context->preference('HomeOrHoldingBranch'); >@@ -219,7 +224,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode, >- replacementprice => 12.00 >+ replacementprice => 12.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -230,7 +236,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode2, >- replacementprice => 23.00 >+ replacementprice => 23.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -241,7 +248,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode3, >- replacementprice => 23.00 >+ replacementprice => 23.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -394,7 +402,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > ModItem({ notforloan => 1 }, $biblionumber, $itemnumber); > ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber, 1); > is( $renewokay, 1, 'Can renew, item is marked not for loan, hold does not block'); >- ModItem({ notforloan => 0, itype => '' }, $biblionumber, $itemnumber,1); >+ ModItem({ notforloan => 0, itype => $itemtype }, $biblionumber, $itemnumber,1); > > # FIXME: Add more for itemtype not for loan etc. > >@@ -405,7 +413,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode5, >- replacementprice => 23.00 >+ replacementprice => 23.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -425,7 +434,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode6, >- replacementprice => 23.00 >+ replacementprice => 23.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -436,7 +446,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode7, >- replacementprice => 23.00 >+ replacementprice => 23.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -485,7 +496,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode4, >- replacementprice => 16.00 >+ replacementprice => 16.00, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -726,7 +738,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > { > homebranch => $branch, > holdingbranch => $branch, >- barcode => $barcode3 >+ barcode => $barcode3, >+ itype => $itemtype > }, > $biblionumber2 > ); >@@ -805,7 +818,8 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > { > homebranch => $branch, > holdingbranch => $branch, >- barcode => $barcode >+ barcode => $barcode, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -861,6 +875,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $library2->{branchcode}, > holdingbranch => $library2->{branchcode}, > barcode => $barcode1, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -870,6 +885,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $library2->{branchcode}, > holdingbranch => $library2->{branchcode}, > barcode => $barcode2, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -946,6 +962,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $branch, > holdingbranch => $branch, > barcode => $barcode, >+ itype => $itemtype > }, > $biblionumber > ); >@@ -976,6 +993,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > homebranch => $library->{branchcode}, > holdingbranch => $library->{branchcode}, > barcode => $barcode, >+ itype => $itemtype > }, > $biblionumber, > ); >-- >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 17575
:
57278
|
57279
|
57289
|
57290
|
57446
|
57447