diff options
author | Marius Halden <marius.h@lden.org> | 2016-05-28 13:49:00 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-05-28 13:49:00 +0200 |
commit | 6791ce86ae15adbded24bd814a78cc0e87f404fa (patch) | |
tree | 99af5da31e4db091350a09bcdee913c99abc2fc3 /t/cobrand/zurich.t | |
parent | 6c1118dbf2c4b15bcfcd77600d36f2389428c75e (diff) | |
parent | 89b0efeb94631c4c31ce33e7f98297e754dd226d (diff) |
Merge tag 'v1.8.2' into fiksgatami-dev
Diffstat (limited to 't/cobrand/zurich.t')
-rw-r--r-- | t/cobrand/zurich.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index 4734dc837..cf66136e5 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -661,7 +661,7 @@ subtest "external report triggers email" => sub { }; $email = $mech->get_email; my $report_id = $report->id; - like $email->header('Subject'), qr/Meldung #$report_id/, 'subject looks okay'; + like Encode::decode('MIME-Header', $email->header('Subject')), qr/Meldung #$report_id/, 'subject looks okay'; like $email->header('To'), qr/test\@example.com/, 'to line looks correct'; like $email->body, qr/$PUBLIC_RESPONSE/, 'public_response was passed on' or die $email->body; $mech->clear_emails_ok; @@ -894,6 +894,11 @@ subtest 'email images to external partners' => sub { my $expected_email_content = path(__FILE__)->parent->child('zurich_attachments.txt')->slurp; my $REPORT_ID = $report->id; + $expected_email_content =~ s{Subject: (.*?)\r?\n}{ + my $subj = Encode::decode('MIME-Header', $1); + $subj =~ s{REPORT_ID}{$REPORT_ID}g; + 'Subject: ' . Email::MIME::Encode::mime_encode($subj, "utf-8") . "\n"; + }eg; $expected_email_content =~ s{REPORT_ID}{$REPORT_ID}g; $expected_email_content =~ s{BOUNDARY}{$boundary}g; my $expected_email = Email::MIME->new($expected_email_content); |