|
Lines 39-48
use MARC::Field;
Link Here
|
| 39 |
|
39 |
|
| 40 |
# Mock userenv, used by AddIssue |
40 |
# Mock userenv, used by AddIssue |
| 41 |
my $branch; |
41 |
my $branch; |
|
|
42 |
my $manager_id; |
| 42 |
my $context = Test::MockModule->new('C4::Context'); |
43 |
my $context = Test::MockModule->new('C4::Context'); |
| 43 |
$context->mock( 'userenv', sub { |
44 |
$context->mock( |
| 44 |
return { branch => $branch, number => 1234, firstname => "Adam", surname => "Smaith" } |
45 |
'userenv', |
| 45 |
}); |
46 |
sub { |
|
|
47 |
return { |
| 48 |
branch => $branch, |
| 49 |
number => $manager_id, |
| 50 |
firstname => "Adam", |
| 51 |
surname => "Smaith" |
| 52 |
}; |
| 53 |
} |
| 54 |
); |
| 46 |
|
55 |
|
| 47 |
my $schema = Koha::Database->schema; |
56 |
my $schema = Koha::Database->schema; |
| 48 |
$schema->storage->txn_begin; |
57 |
$schema->storage->txn_begin; |
|
Lines 59-64
my $rule = Koha::IssuingRule->new(
Link Here
|
| 59 |
); |
68 |
); |
| 60 |
$rule->store(); |
69 |
$rule->store(); |
| 61 |
|
70 |
|
|
|
71 |
my $manager = $builder->build({source => 'Borrower'}); |
| 72 |
$manager_id = $manager->{borrowernumber}; |
| 73 |
|
| 62 |
subtest "InProcessingToShelvingCart tests" => sub { |
74 |
subtest "InProcessingToShelvingCart tests" => sub { |
| 63 |
|
75 |
|
| 64 |
plan tests => 2; |
76 |
plan tests => 2; |
| 65 |
- |
|
|