Commit 58501eb4 authored by joubu's avatar joubu Committed by Koha instance kohadev-koha

Bug 6906: Tests - Do not assume CPL exists

Since bug 14878, tests must create the data they need to pass and not
assume they exist.
Signed-off-by: joubu's avatarJonathan Druart <[email protected]>
Signed-off-by: default avatarKyle M Hall <[email protected]>
parent 6a493842
......@@ -43,10 +43,11 @@ my $inheritCatCode = $builder->build({
});
# Create context for some tests late on in the file.
my $library = $builder->build({ source => 'Branch' });
my $staff = $builder->build({source => 'Borrower'});
my @USERENV = (
$staff->{borrowernumber}, 'test', 'MASTERTEST', 'firstname', 'CPL',
'CPL', '[email protected]'
$staff->{borrowernumber}, 'test', 'MASTERTEST', 'firstname', $library->{branchcode},
$library->{branchcode}, '[email protected]'
);
C4::Context->_new_userenv('DUMMY_SESSION_ID');
C4::Context->set_userenv(@USERENV);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment