Bugzilla – Attachment 156282 Details for
Bug 34918
Koha/Items.t crashes on missing borrower 42 or 51
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34918: Fix userenv for safe_to_delete tests
Bug-34918-Fix-userenv-for-safetodelete-tests.patch (text/plain), 1.44 KB, created by
Marcel de Rooy
on 2023-09-27 11:13:56 UTC
(
hide
)
Description:
Bug 34918: Fix userenv for safe_to_delete tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-27 11:13:56 UTC
Size:
1.44 KB
patch
obsolete
>From a8a3688cd508c753ca1cc002cd6b7d67a2090af0 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 27 Sep 2023 10:43:04 +0000 >Subject: [PATCH] Bug 34918: Fix userenv for safe_to_delete tests >Content-Type: text/plain; charset=utf-8 > >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> >--- > t/db_dependent/Koha/Item.t | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 28a723e49c..d30ea6d54b 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -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 >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34918
:
156234
|
156281
|
156282
|
156382
|
156383