Bug 34918: Fix userenv for safe_to_delete tests
Instead of the fallback to 51, we pass a borrower that has
permission for editing items.
Test plan:
Do not apply patch.
Run test without a borrower 51 in db. (FAIL)
Apply patch.
Run test again. (PASS)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8233f44a5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
3dc01292aa
commit
e369d47eb7
|
|
@ -868,9 +868,10 @@ subtest 'deletion' => sub {
|
|||
|
||||
my $library = $builder->build_object({ class => 'Koha::Libraries' });
|
||||
my $library_2 = $builder->build_object({ class => 'Koha::Libraries' });
|
||||
t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode });
|
||||
|
||||
my $patron = $builder->build_object({class => 'Koha::Patrons'});
|
||||
my $patron = $builder->build_object({class => 'Koha::Patrons', value => { flags => 2^9 } }); # allow edit items
|
||||
t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode, borrowernumber => $patron->id });
|
||||
|
||||
$item = $builder->build_sample_item({ library => $library->branchcode });
|
||||
|
||||
# book_on_loan
|
||||
|
|
|
|||
Loading…
Reference in New Issue