aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-08 14:13:48 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-14 15:36:27 +0000
commit74a7ed654369cb3ebd282c01d4a0de87a646c4ce (patch)
tree27e5e8090d8a1e3be4e69b9d5344e9fa67ee1b6a /t/cobrand
parent7361516252a4d98620f66318cabe75acb3291efb (diff)
Use sender in From if From and To domains match.
To deal with a recipient mail server not allowing inbound email using the same domain as an internal domain, e.g. https://community.mimecast.com/docs/DOC-1419
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/zurich.t8
-rw-r--r--t/cobrand/zurich_attachments.txt2
2 files changed, 5 insertions, 5 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 85cada27a..0a84d2d03 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -82,7 +82,7 @@ $subdivision->endpoint( 'subdivision@example.org' );
$subdivision->update;
my $external_body = $mech->create_body_ok( 4, 'External Body' );
$external_body->send_method( 'Zurich' );
-$external_body->endpoint( 'external_body@example.org' );
+$external_body->endpoint( 'external_body@example.net' );
$external_body->update;
sub get_export_rows_count {
@@ -563,7 +563,7 @@ subtest "external report triggers email" => sub {
send_reports_for_zurich();
$email = $mech->get_email;
like $email->header('Subject'), qr/Weitergeleitete Meldung/, 'subject looks okay';
- like $email->header('To'), qr/external_body\@example.org/, 'to line looks correct';
+ like $email->header('To'), qr/external_body\@example.net/, 'to line looks correct';
like $email->body, qr/External Body/, 'body has right name';
like $email->body, qr/$EXTERNAL_MESSAGE/, 'external_message was passed on';
unlike $email->body, qr/test\@example.com/, 'body does not contain email address';
@@ -599,7 +599,7 @@ subtest "external report triggers email" => sub {
send_reports_for_zurich();
$email = $mech->get_email;
like $email->header('Subject'), qr/Weitergeleitete Meldung/, 'subject looks okay';
- like $email->header('To'), qr/external_body\@example.org/, 'to line looks correct';
+ like $email->header('To'), qr/external_body\@example.net/, 'to line looks correct';
like $email->body, qr/External Body/, 'body has right name';
like $email->body, qr/test\@example.com/, 'body does contain email address';
$mech->clear_emails_ok;
@@ -630,7 +630,7 @@ subtest "external report triggers email" => sub {
send_reports_for_zurich();
$email = $mech->get_email;
like $email->header('Subject'), qr/Weitergeleitete Meldung/, 'subject looks okay';
- like $email->header('To'), qr/external_body\@example.org/, 'to line looks correct';
+ like $email->header('To'), qr/external_body\@example.net/, 'to line looks correct';
like $email->body, qr/External Body/, 'body has right name';
like $email->body, qr/$EXTERNAL_MESSAGE/, 'external_message was passed on';
like $email->body, qr/test\@example.com/, 'body contains email address';
diff --git a/t/cobrand/zurich_attachments.txt b/t/cobrand/zurich_attachments.txt
index bf8d6872b..25a1bacf0 100644
--- a/t/cobrand/zurich_attachments.txt
+++ b/t/cobrand/zurich_attachments.txt
@@ -1,7 +1,7 @@
MIME-Version: 1.0
Subject: =?iso-8859-1?Q?Z=FCri?= wie neu: Weitergeleitete Meldung #REPORT_ID
Content-Type: multipart/mixed; boundary="BOUNDARY"
-To: "External Body" <external_body@example.org>
+To: "External Body" <external_body@example.net>
Content-Transfer-Encoding: 7bit
From: "FixMyStreet" <division@example.org>