[Rt-commit] r17589 - in rt/branches/3.999-DANGEROUS: t/api t/web

jesse at bestpractical.com jesse at bestpractical.com
Tue Jan 6 13:02:29 EST 2009


Author: jesse
Date: Tue Jan  6 13:02:29 2009
New Revision: 17589

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/t/api/reminders.t
   rt/branches/3.999-DANGEROUS/t/web/basic.t
   rt/branches/3.999-DANGEROUS/t/web/query_builder.t

Log:
 r56600 at 17h:  jesse | 2009-01-06 12:27:37 -0500
 * small test cleanups


Modified: rt/branches/3.999-DANGEROUS/t/api/reminders.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/reminders.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/reminders.t	Tue Jan  6 13:02:29 2009
@@ -33,7 +33,7 @@
 isnt($id , 0, 'Success creating ticket');
 
 # Add reminder
-my $due_obj = RT::Date->new( $RT::SystemUser );
+my $due_obj = RT::Date->new( RT->system_user);
 $due_obj->set_to_now;
 ok(my ( $add_id, $add_msg, $txnid ) = $t->reminders->add(
     subject => 'TestReminder',

Modified: rt/branches/3.999-DANGEROUS/t/web/basic.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/basic.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/basic.t	Tue Jan  6 13:02:29 2009
@@ -40,21 +40,22 @@
 $agent->form_number(3);
 # Start with a string containing characters in latin1
 my $string = "I18N Web Testing æøå";
-Encode::from_to($string, 'iso-8859-1', 'utf8');
+my $web_string = $string;
+Encode::from_to($web_string, 'iso-8859-1', 'utf8');
 $agent->field('subject' => "Ticket with utf8 body");
-$agent->field('content' => $string);
+$agent->field('content' => $web_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");
 
-
 $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 = "I18N Web Testing æøå";
-Encode::from_to($string, 'iso-8859-1', 'utf8');
-$agent->field('subject' => $string);
+$web_string = $string;
+Encode::from_to($web_string, 'iso-8859-1', 'utf8');
+$agent->field('subject' => $web_string);
 $agent->field('content' => "Ticket with utf8 subject");
 ok($agent->submit(), "Created new ticket with $string as subject");
 
@@ -66,11 +67,7 @@
 $agent->fill_in_action_ok( $basic_moniker, 'time_worked' => '5h' );
 $agent->submit;
 
-
-TODO: {
-    local $TODO = "We don't handle time worked units yet";
     like ($agent->{'content'}, qr/to '300'/, "5 hours is 300 minutes");
-}
 # }}}
 
 # {{{ query Builder tests

Modified: rt/branches/3.999-DANGEROUS/t/web/query_builder.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/query_builder.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/query_builder.t	Tue Jan  6 13:02:29 2009
@@ -199,9 +199,7 @@
 
 # create a custom field with nonascii name and try to add a condition
 
-TODO: {
-   local $TODO = "4.0 custom fields with non-ascii names currently explode. note sure why.";
-{
+
     my $cf = RT::Model::CustomField->new(current_user => RT->system_user );
     $cf->load_by_name( name => "\x{442}", queue => 0 );
     if ( $cf->id ) {
@@ -218,14 +216,15 @@
     ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
 
     ok($agent->form_name('build_query'), "found the form once");
-    print ($agent->content());
     #$agent->field("ValueOf'CF.{\321\202}'", "\321\201");
     $agent->submit();
+TODO: {
+   local $TODO = "4.0 custom fields with non-ascii names currently explode. note sure why.";
     is( get_query_from_form,
         "'CF.{\321\202}' LIKE '\321\201'",
         "no changes, no duplicate condition with badly encoded text"
     );
-}
+
 
 };
 


More information about the Rt-commit mailing list