Bugzilla – Attachment 170410 Details for
Bug 37623
t/db_dependent/Letters.t tests fails to consider EmailFieldPrimary system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37623: Make t/db_dependent/Letters.t idempotent
Bug-37623-Make-tdbdependentLetterst-idempotent.patch (text/plain), 1.47 KB, created by
Paul Derscheid
on 2024-08-15 16:37:30 UTC
(
hide
)
Description:
Bug 37623: Make t/db_dependent/Letters.t idempotent
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-08-15 16:37:30 UTC
Size:
1.47 KB
patch
obsolete
>From 38268581ed8c8a402c45826d2cfc41915e980cdd Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 13 Aug 2024 03:07:17 +0000 >Subject: [PATCH] Bug 37623: Make t/db_dependent/Letters.t idempotent > >The tests should be unaffected by system preference settings, such as EmailFieldPrimary. > >To test: >1. Log into the staff interface >2. Go to Koha Administration -> Global system preferences, and search for EmailFieldPrimary >3. Change the EmailFieldPrimary preference to something other than 'primary email' and 'first valid email address', i.e. any of the following: > >* alternate email >* card number >* secondary email >* selected addresses > >4. Run tests t/db_dependent/Letters.t and notice they fail > >5. Apply the patch > >6. Run the tests again t/db_dependent/Letters.t with different settings of EmailFieldPrimary. The tests should always pass. > >Sponsored-by: Pymble Ladies' College >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > t/db_dependent/Letters.t | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 662df68de9..d607fa7d04 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -74,6 +74,7 @@ my $dbh = C4::Context->dbh; > $dbh->do(q|DELETE FROM letter|); > $dbh->do(q|DELETE FROM message_queue|); > $dbh->do(q|DELETE FROM message_transport_types|); >+t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); > > my $library = $builder->build({ > source => 'Branch', >-- >2.46.0
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 37623
:
170251
|
170410
|
170423