Bugzilla – Attachment 57349 Details for
Bug 17592
Remove itemtype-related maxsuspensiondays.t warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17592: Remove itemtype-related maxsuspensiondays.t warnings
Bug-17592-Remove-itemtype-related-maxsuspensionday.patch (text/plain), 2.11 KB, created by
Tomás Cohen Arazi
on 2016-11-08 19:30:01 UTC
(
hide
)
Description:
Bug 17592: Remove itemtype-related maxsuspensiondays.t warnings
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2016-11-08 19:30:01 UTC
Size:
2.11 KB
patch
obsolete
>From debfe0fa1d12114017dd51fa82ed7d9fcd1f7fde Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 8 Nov 2016 16:28:07 -0300 >Subject: [PATCH] Bug 17592: Remove itemtype-related maxsuspensiondays.t > warnings > >This patch makes t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t create >good sample data for its tests. It does so by creating a random >itemtype. > >To test: >- Run > $ prove t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >=> FAIL: lots of warnings about "item-level_itypes set but no itemtype >set for item" >- Apply the patch >- Run: > $ prove t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >=> SUCCESS: Tests are green, and no warnings. >- Sign off :-D > >Sponsored-by: ByWater Solutions >--- > t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t b/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >index 78e268d..9695740 100644 >--- a/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >+++ b/t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t >@@ -22,11 +22,9 @@ my $builder = t::lib::TestBuilder->new; > my $dbh = C4::Context->dbh; > $dbh->{RaiseError} = 1; > >-my $library = $builder->build({ >- source => 'Branch', >-}); >+my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; >+my $itemtype = $builder->build({ source => 'Itemtype' })->{itemtype}; > >-my $branchcode = $library->{branchcode}; > local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ }; > my $userenv->{branch} = $branchcode; > *C4::Context::userenv = \&Mock_userenv; >@@ -62,6 +60,7 @@ my (undef, undef, $itemnumber) = AddItem({ > homebranch => $branchcode, > holdingbranch => $branchcode, > barcode => $barcode, >+ itype => $itemtype > } , $biblionumber); > > # clear any holidays to avoid throwing off the suspension day >@@ -102,6 +101,7 @@ is( > ); > DelDebarment( $debarments->[0]->{borrower_debarment_id} ); > >+$schema->storage->txn_rollback; > > # C4::Context->userenv > sub Mock_userenv { >-- >2.7.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 17592
:
57349
|
57368
|
57444