[Rt-commit] [svn] r879 - in RT-Client: . t

autrijus at pallas.eruditorum.org autrijus at pallas.eruditorum.org
Wed May 12 10:59:19 EDT 2004


Author: autrijus
Date: Wed May 12 10:59:17 2004
New Revision: 879

Modified:
   RT-Client/   (props changed)
   RT-Client/t/1-procedural.t
Log:
 ----------------------------------------------------------------------
 r4818 at not:  autrijus | 2004-05-12T14:58:22.874204Z
 
 * support for non-utf8 charsets in Set.
 ----------------------------------------------------------------------


Modified: RT-Client/t/1-procedural.t
==============================================================================
--- RT-Client/t/1-procedural.t	(original)
+++ RT-Client/t/1-procedural.t	Wed May 12 10:59:17 2004
@@ -35,8 +35,8 @@
 is($rt->get(URI => "$uri.Subject"), 'Testing', '->get(URI => .Subject)');
 is($rt->get("$uri.Subject"), 'Testing', '->get(.Subject)');
 is($rt->get("$uri.Queue"), 1, '->get(.Queue)');
-is($rt->get("$uri/Requestors.Count"), 1, '->get(Requestors.Count)');
-is($rt->get("$uri/Requestors/*1.Name"), 'root', '->get(Requestors/*1.Name) is root');
+is($rt->get("$uri/Requestors/UserMembersObj.Count"), 1, '->get(Requestors.Count)');
+is($rt->get("$uri/Requestors/UserMembersObj/*1.Name"), 'root', 'Requestor is root');
 
 is($rt->set("$uri.Subject", 'Set0'), 'Set0', '->set(.Subject)');
 is($rt->get("$uri.Subject"), 'Set0', '->set(.Subject) really happened');
@@ -66,7 +66,7 @@
 isa_ok($ticket, 'RT::Client::Object');
 $uri = $ticket->uri;
 isnt($uri, undef, 'New Ticket has a URI: '.$uri);
-is($rt->get("$uri/Requestors/*1.Name"), 'RT_System', '->get(Requestors/*1.Name) is RT_System');
+is($rt->get("$uri/Requestors/UserMembersObj/*1.Name"), 'RT_System', 'Requestor is RT_System');
 
 # 1.2 Ability to post a ticket to a specific queue.
 
@@ -76,18 +76,17 @@
 isnt($uri, undef, 'New Ticket has a URI: '.$uri);
 is($rt->get("$uri.Queue"), 1, 'posted to the 1st queue');
 
-exit;
-__END__
 # 1.3 Ability to specify message body. May contain utf8 OR localized
 # charset.
 
-$ticket->_encoding('hz');
-is($ticket->_encoding, $rt->encoding, '->_encoding is global');
-$ticket->setSubject('~{1jLb~}');
-$ticket->_encoding('gbk');
-is(length($ticket->Subject), 4);
-$ticket->_encoding('utf-8');
+$rt->encoding('hz');
+is($rt->set("$uri.Subject", '~{1jLb~}'), '~{1jLb~}', '->set(.Subject) with HZ encoding');
+$rt->encoding('gbk');
+is(length($rt->get("$uri.Subject")), 4, 'retrieved with GBK encoding');
+$rt->encoding('UTF-8');
 
+exit;
+__END__
 # 1.4 Ability to set values in n existing custom fields.
 
 my $cf = $queue->CustomFields->add(


More information about the Rt-commit mailing list