Bugzilla – Attachment 164261 Details for
Bug 36268
Letters.t assumes an empty ReplyToDefault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36268: Add a mock for ReplyToDefault
Bug-36268-Add-a-mock-for-ReplyToDefault.patch (text/plain), 2.80 KB, created by
Nick Clemens (kidclamp)
on 2024-04-02 11:39:33 UTC
(
hide
)
Description:
Bug 36268: Add a mock for ReplyToDefault
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-04-02 11:39:33 UTC
Size:
2.80 KB
patch
obsolete
>From 5465bdd35e01b40fdd806ac76366921e9d730ae2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 7 Mar 2024 10:09:13 +0000 >Subject: [PATCH] Bug 36268: Add a mock for ReplyToDefault > >Test plan: >Without this patch, add email address in that pref. >Run Letters.t. It fails. >Now apply patch and run test again. Should pass. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Letters.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index ade28f89ad5..da4375d86a4 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -247,6 +247,7 @@ is( $ISBN_letter->{name}, 'book', 'letter name for "ISBN" letter is book' ); > # GetPreparedLetter > t::lib::Mocks::mock_preference('OPACBaseURL', 'http://thisisatest.com'); > t::lib::Mocks::mock_preference( 'SendAllEmailsTo', '' ); >+t::lib::Mocks::mock_preference( 'ReplytoDefault', q{} ); > > my $sms_content = 'This is a SMS for an <<status>>'; > $dbh->do( q|INSERT INTO letter(branchcode,module,code,name,is_html,title,content,message_transport_type) VALUES (?,'my module','my code','my name',1,'my title',?,'sms')|, undef, $library->{branchcode}, $sms_content ); >@@ -525,9 +526,9 @@ t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' ); > } > qr|Fake send_or_die|, > "SendAlerts is using the mocked send_or_die routine (orderacquisition)"; >- is( $err, 1, "Successfully sent order." ); >- is( $email_object->email->header('To'), 'testemail@mydomain.com', "mailto correct in sent order" ); >- is( defined( $email_object->email->header('Reply-To') ), '', "No reply-to address is set" ); >+ is( $err, 1, "Successfully sent order." ); >+ is( $email_object->email->header('To'), 'testemail@mydomain.com', "mailto correct in sent order" ); >+ is( scalar $email_object->email->header('Reply-To'), undef, "No reply-to address is set" ); > is( > $email_object->email->body, > 'my vendor|John Smith|Ordernumber ' >@@ -764,8 +765,7 @@ subtest 'SendAlerts - claimissue' => sub { > is( $err, 1, "Successfully sent claim" ); > is( $email_object->email->header('To'), > 'testemail@mydomain.com', "mailto correct in sent claim" ); >- is( defined($email_object->email->header('Reply-To')), >- '', "reply-to is not set" ); >+ is( scalar $email_object->email->header('Reply-To'), undef, "reply-to is not set" ); > is( > $email_object->email->body, > "$serialids[0]|2013-01-01|Silence in the library|xxxx-yyyy", >-- >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 36268
:
162895
| 164261