[Rt-commit] rt branch, 4.0/unknown-email-charset, updated. rt-4.0.5-142-gbb7a2b5
Alex Vandiver
alexmv at bestpractical.com
Wed Dec 19 22:19:13 EST 2012
The branch, 4.0/unknown-email-charset has been updated
via bb7a2b53ac689c8394c75b27da04eff40197ad6b (commit)
from 327336a5e88398f6b52161e9ade8661c8b80184c (commit)
Summary of changes:
t/mail/not-supported-charset.t | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit bb7a2b53ac689c8394c75b27da04eff40197ad6b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Dec 19 22:18:49 2012 -0500
Catch and test for the warnings generated on unknown charsets
diff --git a/t/mail/not-supported-charset.t b/t/mail/not-supported-charset.t
index cccee0a..bf2fe8f 100644
--- a/t/mail/not-supported-charset.t
+++ b/t/mail/not-supported-charset.t
@@ -2,6 +2,7 @@ use strict;
use warnings;
use RT::Test tests => undef;
+use Test::Warn;
my $queue = RT::Test->load_or_create_queue( Name => 'General' );
ok $queue->id, 'loaded queue';
@@ -16,9 +17,12 @@ ho hum just some text
END
- my ($stat, $id) = RT::Test->send_via_mailgate($mail);
- is( $stat >> 8, 0, "The mail gateway exited normally" );
- ok( $id, "created ticket" );
+ my ($stat, $id);
+ warning_like {
+ ($stat, $id) = RT::Test->send_via_mailgate($mail);
+ is( $stat >> 8, 0, "The mail gateway exited normally" );
+ ok( $id, "created ticket" );
+ } qr/Encoding 'not-supported-encoding' is not supported/;
my $ticket = RT::Ticket->new( RT->SystemUser );
$ticket->Load($id);
@@ -49,9 +53,12 @@ ho hum just some text
END
- my ($stat, $id) = RT::Test->send_via_mailgate($mail);
- is( $stat >> 8, 0, "The mail gateway exited normally" );
- ok( $id, "created ticket" );
+ my ($stat, $id);
+ warning_like {
+ ($stat, $id) = RT::Test->send_via_mailgate($mail);
+ is( $stat >> 8, 0, "The mail gateway exited normally" );
+ ok( $id, "created ticket" );
+ } qr/Charset 'not-supported' is not supported/;
my $ticket = RT::Ticket->new( RT->SystemUser );
$ticket->Load($id);
@@ -59,4 +66,4 @@ END
is $ticket->Subject, "\x{FFFD}test\x{FFFD}";
}
-done_testing;
\ No newline at end of file
+done_testing;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list