diff options
Diffstat (limited to 'rt/t/api/txn_content.t')
-rw-r--r-- | rt/t/api/txn_content.t | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rt/t/api/txn_content.t b/rt/t/api/txn_content.t index 392b6a73b..672d6c2e0 100644 --- a/rt/t/api/txn_content.t +++ b/rt/t/api/txn_content.t @@ -1,7 +1,7 @@ use warnings; use strict; -use RT::Test tests => 3; +use RT::Test tests => 4; use MIME::Entity; my $ticket = RT::Ticket->new(RT->SystemUser); my $mime = MIME::Entity->build( @@ -16,4 +16,8 @@ my $txns = $ticket->Transactions; $txns->Limit( FIELD => 'Type', VALUE => 'Create' ); my $txn = $txns->First; ok( $txn, 'got Create txn' ); -is( $txn->Content, "this is body\n", "txn's content" ); + +# ->Content converts from text/html to plain text if we don't explicitly ask +# for html. Our html -> text converter seems to add an extra trailing newline +like( $txn->Content, qr/^\s*this is body\s*$/, "txn's html content converted to plain text" ); +is( $txn->Content(Type => 'text/html'), "this is body\n", "txn's html content" ); |