Bugzilla – Attachment 57278 Details for
Bug 17575
Remove Circulation.t warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17575: Remove itemtype-related warnings from Circulation.t
Bug-17575-Remove-itemtype-related-warnings-from-Ci.patch (text/plain), 6.00 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-11-07 19:14:19 UTC
(
hide
)
Description:
Bug 17575: Remove itemtype-related warnings from Circulation.t
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-11-07 19:14:19 UTC
Size:
6.00 KB
patch
obsolete
>From 4550b94e298a34766f6fd7b6bb5a6226aeacbd07 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] 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 >--- > 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.10.2
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