[Rt-commit] rt branch, update-action, updated. abbf18c9f62e088f0d3b2e13c5fb7b3eeb2a0818

sartak at bestpractical.com sartak at bestpractical.com
Wed Jan 20 00:49:41 EST 2010


The branch, update-action has been updated
       via  abbf18c9f62e088f0d3b2e13c5fb7b3eeb2a0818 (commit)
      from  7609f1d6a9df48f999ab2637cd81624453e254ce (commit)

Summary of changes:
 t/web/cf_select_one.t |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit abbf18c9f62e088f0d3b2e13c5fb7b3eeb2a0818
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 20 00:49:19 2010 -0500

    Use action_form instead of J:A:F crap

diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index f887f32..e197c8f 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -10,7 +10,6 @@ my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
 
 my $cf_name = 'test select one value';
-my $cf_moniker = 'edit-ticket-cfs';
 
 my $cfid;
 diag "Create a CF" if $ENV{'TEST_VERBOSE'};
@@ -119,9 +118,10 @@ diag "check that 0 is ok value of the CF"
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
-    my $value = $m->action_field_value('modify_ticket', "cf_$cfid");
+    my $field = $m->action_field_input('modify_ticket', "cf_$cfid");
+    my $value = $field->value;
     is lc $value, 'asd', 'correct value is selected';
-    $m->select("J:A:F-$cfid-$cf_moniker" => 0 );
+    $field->value(0);
     $m->submit;
     $m->content_like(qr/\Q$cf_name\E.*?changed/mi, 'field is changed');
     $m->content_unlike(qr/0 is no longer a value for custom field/mi, 'no bad message in results');
@@ -144,9 +144,10 @@ diag "check that we can set empty value when the current is 0"
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
-    my $value = $m->action_field_value('modify_ticket', "cf_$cfid");
+    my $field = $m->action_field_input('modify_ticket', "cf_$cfid");
+    my $value = $field->value;
     is lc $value, '0', 'correct value is selected';
-    $m->select("J:A:F-$cfid-$cf_moniker" => '' );
+    $field->value('');
     $m->submit;
     $m->content_like(qr/0 is no longer a value for custom field/mi, '0 is no longer a value');
 

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


More information about the Rt-commit mailing list