Bugzilla – Attachment 152705 Details for
Bug 34126
Tests in t/db_dependent/Koha/Patron.t fail due broken FK constraint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34126: Mock userenv in safe_to_delete() tests
0001-Bug-34126-Mock-userenv-in-safe_to_delete-tests.patch (text/plain), 1008 bytes, created by
Emmi Takkinen
on 2023-06-27 07:04:11 UTC
(
hide
)
Description:
Bug 34126: Mock userenv in safe_to_delete() tests
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2023-06-27 07:04:11 UTC
Size:
1008 bytes
patch
obsolete
>From 7a590c7532f7816eac058850f9a2e71259f02319 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Tue, 27 Jun 2023 10:02:51 +0300 >Subject: [PATCH] Bug 34126: Mock userenv in safe_to_delete() tests > >Koha/Patron.t tests failed due broken FK constraint >error. Mocking userenv fixes this. > >To test prove t/db_dependent/Koha/Patron.t. >--- > t/db_dependent/Koha/Patron.t | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index 5d05a16efd..def32800ec 100755 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -1069,6 +1069,10 @@ subtest 'safe_to_delete() tests' => sub { > > my $patron = $builder->build_object({ class => 'Koha::Patrons' }); > >+ my $patron_2 = $builder->build_object({ class => 'Koha::Patrons' }); >+ >+ t::lib::Mocks::mock_userenv({ patron => $patron_2 }); >+ > ## Make it the anonymous > t::lib::Mocks::mock_preference( 'AnonymousPatron', $patron->id ); > >-- >2.34.1 >
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 34126
: 152705