#!/usr/bin/perl use strict; use warnings; use RT::Test tests => 19; use Encode; my ( $baseurl, $m ) = RT::Test->started_ok; ok $m->login, 'logged in as root'; use utf8; diag('make Autoreply template a html one and add utf8 chars') if $ENV{TEST_VERBOSE}; { $m->follow_link_ok( { id => 'tools-config-global-templates' }, '-> Templates' ); $m->follow_link_ok( { text => 'Autoreply' }, '-> Autoreply' ); $m->submit_form( form_name => 'ModifyTemplate', fields => { Content => <<'EOF', Subject: AutoReply: {$Ticket->Subject} Content-Type: text/html 你好 éèà€ {$Ticket->Subject} ------------------------------------------------------------------------- {$Transaction->Content()} EOF }, ); $m->content_like( qr/Content changed/, 'content is changed' ); $m->content_contains( '你好', 'content is really updated' ); } diag('create a ticket to see the autoreply mail') if $ENV{TEST_VERBOSE}; { $m->get_ok( $baseurl . '/Ticket/Create.html?Queue=1' ); $m->submit_form( form_name => 'TicketCreate', fields => { Subject => '标题', Content => '