Bug 22008: (follow-up) Additional fix for bad test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2019-03-27 14:47:27 +00:00 committed by Nick Clemens
parent 18f9c3eb51
commit 2be687c419
1 changed files with 15 additions and 3 deletions

View File

@ -39,10 +39,19 @@ use MARC::Field;
# Mock userenv, used by AddIssue
my $branch;
my $manager_id;
my $context = Test::MockModule->new('C4::Context');
$context->mock( 'userenv', sub {
return { branch => $branch, number => 1234, firstname => "Adam", surname => "Smaith" }
});
$context->mock(
'userenv',
sub {
return {
branch => $branch,
number => $manager_id,
firstname => "Adam",
surname => "Smaith"
};
}
);
my $schema = Koha::Database->schema;
$schema->storage->txn_begin;
@ -59,6 +68,9 @@ my $rule = Koha::IssuingRule->new(
);
$rule->store();
my $manager = $builder->build({source => 'Borrower'});
$manager_id = $manager->{borrowernumber};
subtest "InProcessingToShelvingCart tests" => sub {
plan tests => 2;