[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-174-g5e90c85

? sunnavy sunnavy at bestpractical.com
Tue Oct 19 22:21:11 EDT 2010


The branch, 3.8-trunk has been updated
       via  5e90c854bb5f752137fa2973c3044330eaf41bd0 (commit)
      from  6c44641cd50c4f3ad631f4cb22292bb37a3c6c97 (commit)

Summary of changes:
 t/web/html_template.t |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 5e90c854bb5f752137fa2973c3044330eaf41bd0
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Oct 20 08:41:45 2010 +0800

    make content html to test more

diff --git a/t/web/html_template.t b/t/web/html_template.t
index 0976847..a2461dc 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 18;
+use RT::Test tests => 19;
 use Encode;
 my ( $baseurl, $m ) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -49,7 +49,8 @@ diag('create a ticket to see the autoreply mail') if $ENV{TEST_VERBOSE};
     $m->form_number(3);
     $m->submit_form(
         form_number => 3,
-        fields      => { Subject => '标题', Content => '测试', },
+        fields      => { Subject => '标题', Content => '<h1>测试</h1>',
+        ContentType => 'text/html' },
     );
     $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
     $m->follow_link( text => 'Show' );
@@ -57,8 +58,8 @@ diag('create a ticket to see the autoreply mail') if $ENV{TEST_VERBOSE};
     $m->content_contains( 'éèà€', 'html has éèà€' );
     $m->content_contains( '标题',
         'html has ticket subject 标题' );
-    $m->content_contains( '测试',
-        'html has ticket content 测试' );
+    $m->content_contains( '&lt;h1&gt;测试&lt;/h1&gt;',
+        'html has ticket html content 测试' );
 }
 
 diag('test real mail outgoing') if $ENV{TEST_VERBOSE};
@@ -72,5 +73,6 @@ diag('test real mail outgoing') if $ENV{TEST_VERBOSE};
     like( $mail, qr/éèà€.*éèà€/s, 'mail has éèà€' );
     like( $mail, qr/标题.*标题/s,    'mail has ticket subject 标题' );
     like( $mail, qr/测试.*测试/s,    'mail has ticket content 测试' );
+    like( $mail, qr!<h1>测试</h1>!,    'mail has ticket html content 测试' );
 }
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list