Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Commit

rt branch, 3.999-trunk, updated. 89cba24be778542f3237d8c4323813f7264737eb

 

 

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded


sunnavy at bestpractical

Nov 5, 2009, 4:40 PM

Post #1 of 1 (218 views)
Permalink
rt branch, 3.999-trunk, updated. 89cba24be778542f3237d8c4323813f7264737eb

The branch, 3.999-trunk has been updated
via 89cba24be778542f3237d8c4323813f7264737eb (commit)
from af525c71ca4397beabb31762ed5cc4b45089fd71 (commit)

Summary of changes:
t/web/basic.t | 11 +++++------
t/web/ticket-create-utf8.t | 6 ++++--
2 files changed, 9 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit 89cba24be778542f3237d8c4323813f7264737eb
Author: sunnavy <sunnavy [at] bestpractical>
Date: Fri Nov 6 08:38:50 2009 +0800

update utf8 tests

diff --git a/t/web/basic.t b/t/web/basic.t
index 424820f..0897ff2 100644
--- a/t/web/basic.t
+++ b/t/web/basic.t
@@ -39,9 +39,10 @@ $agent->get($url."/Ticket/Create.html?queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
$agent->form_number(3);
# Start with a string containing characters in latin1
-my $string = Encode::decode_utf8("I18N Web Testing æøå");
+my $string = "I18N Web Testing æøå";
+my $decoded_string = Encode::decode_utf8($string);
$agent->field('subject' => "Ticket with utf8 body");
-$agent->field('content' => $string);
+$agent->field('content' => $decoded_string);
ok($agent->submit(), "Created new ticket with $string as content");
like( $agent->{'content'}, qr{$string} , "Found the content");
ok($agent->{redirected_uri}, "Did redirection");
@@ -49,12 +50,10 @@ ok($agent->{redirected_uri}, "Did redirection");
$agent->get($url."/Ticket/Create.html?queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
$agent->form_number(3);
-# Start with a string containing characters in latin1
-$string = Encode::decode_utf8("I18N Web Testing æøå");
-$agent->field('subject' => $string);
+
+$agent->field('subject' => $decoded_string);
$agent->field('content' => "Ticket with utf8 subject");
ok($agent->submit(), "Created new ticket with $string as subject");
-
like( $agent->{'content'}, qr{$string} , "Found the content");

# Update time worked in hours
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
index 3ad7da1..745f3c4 100644
--- a/t/web/ticket-create-utf8.t
+++ b/t/web/ticket-create-utf8.t
@@ -43,12 +43,14 @@ ok $m->login, 'logged in';
$m->field( content => $ru_support );
$m->submit;

+ my $encoded_ru_test = Encode::encode_utf8( $ru_test );
+ my $encoded_ru_support = Encode::encode_utf8( $ru_support );
$m->content_like(
- qr{<td\s+class="message-header-value"[^>]*>\s*\Q$ru_test\E\s*</td>}i,
+ qr{<td\s+class="message-header-value"[^>]*>\s*\Q$encoded_ru_test\E\s*</td>}i,
'header on the page'
);
$m->content_like(
- qr{\Q$ru_support\E}i,
+ qr{\Q$encoded_ru_support\E}i,
'content on the page'
);
}

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

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.