Bugzilla – Attachment 57960 Details for
Bug 17716
Remove itemtype-related t/db_dependent/CourseReserves.t warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t
Bug-17716-Remove-itemtype-related-tdbdependentCour.patch (text/plain), 2.08 KB, created by
Jonathan Druart
on 2016-12-05 13:24:30 UTC
(
hide
)
Description:
Bug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-05 13:24:30 UTC
Size:
2.08 KB
patch
obsolete
>From 6e06ec1fdc9e36b491ba9d01bb30de0bb23da1ac Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 2 Dec 2016 15:21:58 -0300 >Subject: [PATCH] Bug 17716: Remove itemtype-related > t/db_dependent/CourseReserves.t > >This patch makes t/db_dependent/CourseReserves.t create >good sample data for its tests. It does so by creating a random >itemtype. > >To test: >- Run > $ prove t/db_dependent/CourseReserves.t >=> FAIL: lots of warnings about "item-level_itypes set but no itemtype > set for item" >- Apply the patch >- Run: > $ prove t/db_dependent/CourseReserves.t >=> SUCCESS: Tests are green, and no warnings. >- Sign off :-D > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/CourseReserves.t | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/CourseReserves.t b/t/db_dependent/CourseReserves.t >index d893890..720fb78 100755 >--- a/t/db_dependent/CourseReserves.t >+++ b/t/db_dependent/CourseReserves.t >@@ -25,9 +25,9 @@ my $builder = t::lib::TestBuilder->new; > my $dbh = C4::Context->dbh; > $dbh->{RaiseError} = 1; > >-my $library = $builder->build({ >- source => 'Branch', >-}); >+my $library = $builder->build( { source => 'Branch' } ); >+my $itemtype = $builder->build( >+ { source => 'Itemtype', value => { notforloan => undef } } )->{itemtype}; > > my $sth = $dbh->prepare("SELECT * FROM borrowers ORDER BY RAND() LIMIT 10"); > $sth->execute(); >@@ -39,7 +39,13 @@ $record->append_fields( > MARC::Field->new( '952', '0', '0', a => $library->{branchcode}, b => $library->{branchcode} ) > ); > my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio($record, ''); >-my @iteminfo = C4::Items::AddItem( { homebranch => $library->{branchcode}, holdingbranch => $library->{branchcode} }, $biblionumber ); >+my @iteminfo = C4::Items::AddItem( >+ { homebranch => $library->{branchcode}, >+ holdingbranch => $library->{branchcode}, >+ itype => $itemtype >+ }, >+ $biblionumber >+); > my $itemnumber = $iteminfo[2]; > > my $course_id = ModCourse( >-- >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 17716
:
57938
|
57939
|
57941
|
57942
| 57960 |
57961