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>
This commit is contained in:
parent
3298b27985
commit
f8233f44a5
|
|
@ -869,9 +869,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