Lines 25-33
my $builder = t::lib::TestBuilder->new;
Link Here
|
25 |
my $dbh = C4::Context->dbh; |
25 |
my $dbh = C4::Context->dbh; |
26 |
$dbh->{RaiseError} = 1; |
26 |
$dbh->{RaiseError} = 1; |
27 |
|
27 |
|
28 |
my $library = $builder->build({ |
28 |
my $library = $builder->build( { source => 'Branch' } ); |
29 |
source => 'Branch', |
29 |
my $itemtype = $builder->build( |
30 |
}); |
30 |
{ source => 'Itemtype', value => { notforloan => undef } } )->{itemtype}; |
31 |
|
31 |
|
32 |
my $sth = $dbh->prepare("SELECT * FROM borrowers ORDER BY RAND() LIMIT 10"); |
32 |
my $sth = $dbh->prepare("SELECT * FROM borrowers ORDER BY RAND() LIMIT 10"); |
33 |
$sth->execute(); |
33 |
$sth->execute(); |
Lines 39-45
$record->append_fields(
Link Here
|
39 |
MARC::Field->new( '952', '0', '0', a => $library->{branchcode}, b => $library->{branchcode} ) |
39 |
MARC::Field->new( '952', '0', '0', a => $library->{branchcode}, b => $library->{branchcode} ) |
40 |
); |
40 |
); |
41 |
my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio($record, ''); |
41 |
my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio($record, ''); |
42 |
my @iteminfo = C4::Items::AddItem( { homebranch => $library->{branchcode}, holdingbranch => $library->{branchcode} }, $biblionumber ); |
42 |
my @iteminfo = C4::Items::AddItem( |
|
|
43 |
{ homebranch => $library->{branchcode}, |
44 |
holdingbranch => $library->{branchcode}, |
45 |
itype => $itemtype |
46 |
}, |
47 |
$biblionumber |
48 |
); |
43 |
my $itemnumber = $iteminfo[2]; |
49 |
my $itemnumber = $iteminfo[2]; |
44 |
|
50 |
|
45 |
my $course_id = ModCourse( |
51 |
my $course_id = ModCourse( |
46 |
- |
|
|