Bugzilla – Attachment 126526 Details for
Bug 28729
Return-path header not set in emails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28729: Unit tests
Bug-28729-Unit-tests.patch (text/plain), 1.59 KB, created by
Martin Renvoize (ashimema)
on 2021-10-19 16:22:57 UTC
(
hide
)
Description:
Bug 28729: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-19 16:22:57 UTC
Size:
1.59 KB
patch
obsolete
>From 4404d7f7554313179ab6f84db9b1d1d2272ab7e1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 19 Oct 2021 16:57:10 +0100 >Subject: [PATCH] Bug 28729: Unit tests > >--- > t/Koha/Email.t | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/t/Koha/Email.t b/t/Koha/Email.t >index a329950a37..0d12016725 100755 >--- a/t/Koha/Email.t >+++ b/t/Koha/Email.t >@@ -191,7 +191,7 @@ subtest 'create() tests' => sub { > > subtest 'send_or_die() tests' => sub { > >- plan tests => 4; >+ plan tests => 7; > > my $email; > my $args; >@@ -232,9 +232,10 @@ subtest 'send_or_die() tests' => sub { > ); > > $THE_email->send_or_die( >- { transport => $transport, to => ['tomasito@mail.com'] } ); >+ { transport => $transport, to => ['tomasito@mail.com'], from => 'returns@example.com' } ); > is_deeply( $args->{to}, ['tomasito@mail.com'], > 'If explicitly passed, "to" is preserved' ); >+ is( $args->{from}, 'returns@example.com', 'If explicitly pass, "from" is preserved'); > > $THE_email->send_or_die( { transport => $transport } ); > my @to = sort @{ $args->{to} }; >@@ -247,6 +248,9 @@ subtest 'send_or_die() tests' => sub { > 'If "to" is not explicitly passed, extract recipients from headers' > ); > is( $email->header_str('Bcc'), undef, 'The Bcc header is unset' ); >+ my $from = $args->{from}; >+ is( $from, 'sender@example.com', 'If "from" is not explicitly passed, extract from Sender header' ); >+ is( $email->header_str('Sender'), undef, 'The Sender header is unset' ); > }; > > subtest 'is_valid' => sub { >-- >2.20.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 28729
:
126436
|
126526
|
126527
|
127016
|
127017
|
127085
|
127086
|
127094