[Rt-commit] r5087 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Tue Apr 25 08:26:52 EDT 2006


Author: ruz
Date: Tue Apr 25 08:26:50 2006
New Revision: 5087

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/26command_line.t

Log:
 r2165 at cubic-pc (orig r4744):  kevinr | 2006-03-14 02:42:01 +0300
  r11456 at SAD-GIRL-IN-SNOW:  kevinr | 2006-03-13 18:41:41 -0500
  * Added tests for a basic (not-yet-implemented) CLI mechanism to create and
  modify custom fields
 


Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/26command_line.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/26command_line.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/26command_line.t	Tue Apr 25 08:26:50 2006
@@ -200,7 +200,7 @@
 TODO: { 
     todo_skip "Listing non-ticket items doesn't work", 2;
     expect_send("list -t group 'id > 0'", 'Listing the groups...');
-    expect_like(qr/$user_id: EditedGroup$$/, 'Found the group');
+    expect_like(qr/$group_id: EditedGroup$$/, 'Found the group');
 }
 }
 
@@ -223,15 +223,33 @@
 TODO: { 
     todo_skip "Listing non-ticket items doesn't work", 2;
     expect_send("list -t queue 'id > 0'", 'Listing the queues...');
-    expect_like(qr/$user_id: EditedQueue$$/, 'Found the queue');
+    expect_like(qr/$queue_id: EditedQueue$$/, 'Found the queue');
 }
 
 # }}}
 
-# {{{ custom field manipulation
-
-# creating custom fields (TODO)
-# updating custom field values
+TODO: {
+todo_skip "Custom field manipulation not yet implemented", 8;
+# {{{ test custom field manipulation
+
+# creating custom fields
+expect_send("create -t custom_field set Name='NewCF$$'", 'Creating a custom field...');
+expect_like(qr/Custom Field \d+ created/, 'Created the custom field');
+expect_handle->before() =~ /Custom Field (\d+) created/;
+my $cf_id = $1;
+ok($cf_id, "Got custom field id=$cf_id");
+# updating custom fields
+expect_send("edit cf/$cf_id set Name='EditedCF$$'", 'Editing the custom field');
+expect_like(qr/Custom field $cf_id updated/, 'Edited the custom field');
+expect_send("show cf/$cf_id", 'Showing the queue...');
+expect_like(qr/id: custom_field\/$cf_id/, 'Saw the custom field');
+expect_like(qr/Name: EditedCF$$/, 'Saw the modification');
+TODO: { 
+    todo_skip "Listing non-ticket items doesn't work", 2;
+    expect_send("list -t custom_field 'id > 0'", 'Listing the CFs...');
+    expect_like(qr/$cf_id: EditedCF$$/, 'Found the custom field');
+}
+}
 
 # }}}
 


More information about the Rt-commit mailing list