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: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
6a493842cf
commit
58501eb4d4
|
|
@ -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@example.org'
|
||||
$staff->{borrowernumber}, 'test', 'MASTERTEST', 'firstname', $library->{branchcode},
|
||||
$library->{branchcode}, 'email@example.org'
|
||||
);
|
||||
C4::Context->_new_userenv('DUMMY_SESSION_ID');
|
||||
C4::Context->set_userenv(@USERENV);
|
||||
|
|
|
|||
Loading…
Reference in New Issue