diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-09-27 20:27:43 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-09-27 20:27:43 -0700 |
commit | 3185fe4edea62dd3fa9818cf80902e96fe2a2d21 (patch) | |
tree | 824a6cdb4b8ccc163127e00e1e86435b4c523476 /rt/t/mail/gateway.t | |
parent | f50a821d306b561d602edbdac0dac958b862ec0c (diff) | |
parent | 39533c66139210655fc47404a17fd4e9b9ca8a00 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Conflicts:
FS/FS/cust_main/Billing.pm
Diffstat (limited to 'rt/t/mail/gateway.t')
-rw-r--r-- | rt/t/mail/gateway.t | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/rt/t/mail/gateway.t b/rt/t/mail/gateway.t index 9f0e669a3..98eabd56e 100644 --- a/rt/t/mail/gateway.t +++ b/rt/t/mail/gateway.t @@ -57,7 +57,7 @@ use strict; use warnings; -use RT::Test config => 'Set( $UnsafeEmailCommands, 1);', tests => 221, actual_server => 1; +use RT::Test config => 'Set( $UnsafeEmailCommands, 1);', tests => 228, actual_server => 1; my ($baseurl, $m) = RT::Test->started_ok; use RT::Tickets; @@ -608,6 +608,35 @@ EOF $m->no_warnings_ok; } +diag "make sure we check that UTF-8 is really UTF-8"; +{ + my $text = <<EOF; +From: root\@localhost +To: rtemail\@@{[RT->Config->Get('rtname')]} +Subject: This is test wrong utf-8 chars +Content-Type: text/plain; charset="utf-8" + +utf-8: informaci\303\263n confidencial +latin1: informaci\363n confidencial + +bye +EOF + my ($status, $id) = RT::Test->send_via_mailgate_and_http($text); + is ($status >> 8, 0, "The mail gateway exited normally"); + ok ($id, "created ticket"); + + my $tick = RT::Test->last_ticket; + is ($tick->Id, $id, "correct ticket"); + + my $content = $tick->Transactions->First->Content; + Encode::_utf8_off($content); + + like $content, qr{informaci\303\263n confidencial}; + like $content, qr{informaci\357\277\275n confidencial}; + + $m->no_warnings_ok; +} + diag "check that mailgate doesn't suffer from empty Reply-To:"; { my $text = <<EOF; |