Lines 24-29
use C4::Context;
Link Here
|
24 |
use Koha::Database; |
24 |
use Koha::Database; |
25 |
use Koha::DateUtils; |
25 |
use Koha::DateUtils; |
26 |
|
26 |
|
|
|
27 |
use t::lib::TestBuilder; |
28 |
|
27 |
BEGIN { |
29 |
BEGIN { |
28 |
use_ok('Koha::Objects'); |
30 |
use_ok('Koha::Objects'); |
29 |
use_ok('Koha::Patrons'); |
31 |
use_ok('Koha::Patrons'); |
Lines 33-44
BEGIN {
Link Here
|
33 |
my $database = Koha::Database->new(); |
35 |
my $database = Koha::Database->new(); |
34 |
my $schema = $database->schema(); |
36 |
my $schema = $database->schema(); |
35 |
$schema->storage->txn_begin(); |
37 |
$schema->storage->txn_begin(); |
|
|
38 |
my $builder = t::lib::TestBuilder->new; |
36 |
|
39 |
|
37 |
$schema->resultset('Issue')->delete_all(); |
40 |
my $categorycode = $builder->build({ source => 'Category' })->{categorycode}; |
38 |
$schema->resultset('Borrower')->delete_all(); |
41 |
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; |
39 |
|
|
|
40 |
my $categorycode = $schema->resultset('Category')->first()->categorycode(); |
41 |
my $branchcode = $schema->resultset('Branch')->first()->branchcode(); |
42 |
|
42 |
|
43 |
my $b1 = Koha::Patron->new( |
43 |
my $b1 = Koha::Patron->new( |
44 |
{ |
44 |
{ |
45 |
- |
|
|