Bugzilla – Attachment 171447 Details for
Bug 37757
notice_email_address explodes if EmailFieldPrimary is not valid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37757: Unit tests
Bug-37757-Unit-tests.patch (text/plain), 1.76 KB, created by
Martin Renvoize (ashimema)
on 2024-09-13 11:53:36 UTC
(
hide
)
Description:
Bug 37757: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-09-13 11:53:36 UTC
Size:
1.76 KB
patch
obsolete
>From 4b277f3feeaa2f2223982be8e1501831ce4fe3d2 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 28 Aug 2024 14:56:44 -0300 >Subject: [PATCH] Bug 37757: Unit tests > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Koha/Patron.t | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index bf4aeef0970..fec2bb5ef2c 100755 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -1789,17 +1789,19 @@ subtest 'notify_library_of_registration()' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'notice_email_address' => sub { >+subtest 'notice_email_address() tests' => sub { >+ > plan tests => 3; >+ > $schema->storage->txn_begin; > > my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); > > t::lib::Mocks::mock_preference( 'EmailFieldPrecedence', 'email|emailpro' ); >- t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); >+ t::lib::Mocks::mock_preference( 'EmailFieldPrimary', undef ); > is( > $patron->notice_email_address, $patron->email, >- "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is off" >+ "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is not defined" > ); > > t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'emailpro' ); >@@ -1815,7 +1817,6 @@ subtest 'notice_email_address' => sub { > "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is 'MULTI' and EmailFieldSelection is 'email,emailpro'" > ); > >- $patron->delete; > $schema->storage->txn_rollback; > }; > >-- >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 37757
:
170840
|
170841
|
170842
|
170843
|
171160
|
171161
|
171162
|
171163
| 171447 |
171448
|
171449
|
171450
|
171496