Bugzilla – Attachment 57434 Details for
Bug 17603
Remove itemtype-related Borrower_Discharge.t warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings
SIGNED-OFFBug-17603-Remove-itemtype-related-Borrow.patch (text/plain), 2.49 KB, created by
Héctor Eduardo Castro Avalos
on 2016-11-10 17:08:50 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 17603: Remove itemtype-related Borrower_Discharge.t warnings
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-11-10 17:08:50 UTC
Size:
2.49 KB
patch
obsolete
>From 968cba7dff1c9d4575f503af160fd2bfa9900af6 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 9 Nov 2016 16:45:38 -0300 >Subject: [PATCH] [SIGNED-OFF]Bug 17603: Remove itemtype-related > Borrower_Discharge.t warnings > >This patch makes t/db_dependent/Patron/Borrower_Discharge.t create >good sample data for its tests. It does so by creating a random >itemtype. > >To test: >- Run > $ prove t/db_dependent/Patron/Borrower_Discharge.t >=> FAIL: lots of warnings about "item-level_itypes set but no itemtype >set for item" >- Apply the patch >- Run: > $ prove t/db_dependent/Patron/Borrower_Discharge.t >=> SUCCESS: Tests are green, and no warnings. >- Sign off :-D > >Sponsored-by: ByWater Solutions >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >--- > t/db_dependent/Patron/Borrower_Discharge.t | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Patron/Borrower_Discharge.t b/t/db_dependent/Patron/Borrower_Discharge.t >index d256f94..dbdd7af 100644 >--- a/t/db_dependent/Patron/Borrower_Discharge.t >+++ b/t/db_dependent/Patron/Borrower_Discharge.t >@@ -38,12 +38,9 @@ my $builder = t::lib::TestBuilder->new; > my $dbh = C4::Context->dbh; > $dbh->do(q|DELETE FROM discharges|); > >-my $library = $builder->build({ >- source => 'Branch', >-}); >-my $another_library = $builder->build({ >- source => 'Branch', >-}); >+my $library = $builder->build({ source => 'Branch' }); >+my $another_library = $builder->build({ source => 'Branch' }); >+my $itemtype = $builder->build({ source => 'Itemtype' })->{itemtype}; > > C4::Context->_new_userenv('xxx'); > C4::Context->set_userenv(0, 0, 0, 'firstname', 'surname', $library->{branchcode}, $library->{branchcode}, '', '', '', '', ''); >@@ -69,7 +66,15 @@ my $patron3 = $builder->build({ > # Discharge not possible with issues > my ( $biblionumber ) = AddBiblio( MARC::Record->new, ''); > my $barcode = 'BARCODE42'; >-my ( undef, undef, $itemnumber ) = AddItem({ homebranch => $library->{branchcode}, holdingbranch => $library->{branchcode}, barcode => $barcode }, $biblionumber); >+my ( undef, undef, $itemnumber ) = AddItem( >+ { homebranch => $library->{branchcode}, >+ holdingbranch => $library->{branchcode}, >+ barcode => $barcode, >+ itype => $itemtype >+ }, >+ $biblionumber >+); >+ > AddIssue( $patron, $barcode ); > is( Koha::Patron::Discharge::can_be_discharged({ borrowernumber => $patron->{borrowernumber} }), 0, 'A patron with issues cannot be discharged' ); > >-- >1.7.10.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 17603
:
57397
|
57434
|
57441