[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.6-63-g30e610f

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Nov 2 01:16:41 EST 2009


The branch, 3.8-trunk has been updated
       via  30e610f1d916bbd3d91e24380a7406deea6bd595 (commit)
       via  f1eb6a3433e9cab95a8737b3976e0900028407ad (commit)
      from  4eb846f4b7da66940f6bc479a0367d226969e99d (commit)

Summary of changes:
 t/web/offline_messages_utf8.t |   67 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 t/web/offline_messages_utf8.t

- Log -----------------------------------------------------------------
commit f1eb6a3433e9cab95a8737b3976e0900028407ad
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Nov 2 14:13:55 2009 +0800

    add t/web/offline_messages_utf8.t

diff --git a/t/web/offline_messages_utf8.t b/t/web/offline_messages_utf8.t
new file mode 100644
index 0000000..c32e0bc
--- /dev/null
+++ b/t/web/offline_messages_utf8.t
@@ -0,0 +1,67 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+use RT::Test tests => 6;
+use File::Temp qw/tempfile/;
+use Encode;
+use RT::Ticket;
+
+my ( $url, $m ) = RT::Test->started_ok;
+$m->default_header( 'Accept-Language' => "zh-cn" );
+ok( $m->login, 'logged in' );
+
+my $ticket_id;
+my $template;
+
+{
+
+    # test create message
+    $template = <<EOF;
+===Create-Ticket: ticket1
+Queue: General
+Subject: test message
+Status: new
+Content: 
+ENDOFCONTENT
+Due: 
+TimeEstimated: 100
+TimeLeft: 100
+FinalPriority: 90
+EOF
+
+    $m->get_ok( $url . '/Tools/Offline.html' );
+
+    $m->submit_form(
+        form_name => 'TicketUpdate',
+        fields    => { string => $template, },
+        button    => 'UpdateTickets',
+    );
+    my $content = encode 'utf8', $m->content;
+    ok( $content =~ qr/申请单 #(\d+) 成功新增于 &#39;General&#39; 表单/, 'message is shown right' );
+    $ticket_id = $1;
+}
+
+{
+
+    # test update message
+    $template = <<EOF;
+===Update-Ticket: 1
+Subject: test message update
+EOF
+
+    $m->get_ok( $url . '/Tools/Offline.html' );
+    $m->submit_form(
+        form_name => 'TicketUpdate',
+        fields    => { string => $template, },
+        button    => 'UpdateTickets',
+    );
+
+    my $content = encode 'utf8', $m->content;
+    ok(
+        $content =~
+qr/主题\s*的值从\s*&#39;test message&#39;\s*改为\s*&#39;test message update&#39;/,
+        'subject is updated'
+    );
+}
+

commit 30e610f1d916bbd3d91e24380a7406deea6bd595
Merge: f1eb6a3 4eb846f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Nov 2 14:14:23 2009 +0800

    Merge branch '3.8-trunk' of diesel:/git/rt into 3.8-trunk


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


More information about the Rt-commit mailing list