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

sartak at bestpractical.com sartak at bestpractical.com
Wed Jan 20 00:24:57 EST 2010


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

Summary of changes:
 t/web/cf_select_one.t |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 7609f1d6a9df48f999ab2637cd81624453e254ce
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 20 00:24:35 2010 -0500

    Various test fixes. All the tests run but some still fail

diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index 2db5166..f887f32 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test strict => 1, tests => 41, l10n => 1;
+use RT::Test strict => 1, tests => 42, l10n => 1;
 
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -94,14 +94,15 @@ diag "check that values of the CF are case insensetive(asd vs. ASD)"
     ok $m->goto_ticket( $tid ), "opened ticket's page";
     $m->follow_link( url_regex => qr{ticket/modify} );
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
+    ok($m->action_form('modify_ticket'), 'form on page');
     $m->content_like(qr/\Q$cf_name/, 'CF on the page');
 
-    my $value = $m->form_name('ticket_modify')->value("J:A:F-$cfid-$cf_moniker");
+    my $value = $m->action_field_value('modify_ticket', "cf_$cfid");
     is lc $value, 'asd', 'correct value is selected';
     $m->submit;
     $m->content_unlike(qr/\Q$cf_name\E.*?changed/mi, 'field is not changed');
 
-    $value = $m->form_name('ticket_modify')->value("J:A:F-$cfid-$cf_moniker");
+    $value = $m->action_field_value('modify_ticket', "cf_$cfid");
     is lc $value, 'asd', 'the same value is still selected';
     my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
     $ticket->load( $tid );
@@ -118,14 +119,14 @@ 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->form_name('ticket_modify')->value("J:A:F-$cfid-$cf_moniker");
+    my $value = $m->action_field_value('modify_ticket', "cf_$cfid");
     is lc $value, 'asd', 'correct value is selected';
     $m->select("J:A:F-$cfid-$cf_moniker" => 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');
 
-    $value = $m->form_name('ticket_modify')->value("J:A:F-$cfid-$cf_moniker");
+    $value = $m->action_field_value('modify_ticket', "cf_$cfid");
     is lc $value, '0', 'new value is selected';
 
     my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );
@@ -143,13 +144,13 @@ 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->form_name('ticket_modify')->value("J:A:F-$cfid-$cf_moniker");
+    my $value = $m->action_field_value('modify_ticket', "cf_$cfid");
     is lc $value, '0', 'correct value is selected';
     $m->select("J:A:F-$cfid-$cf_moniker" => '' );
     $m->submit;
     $m->content_like(qr/0 is no longer a value for custom field/mi, '0 is no longer a value');
 
-    $value = $m->form_name('ticket_modify')->value("J:A:F-$cfid-$cf_moniker");
+    $value = $m->action_field_value('modify_ticket', "cf_$cfid");
     is $value, '', '(no value) is selected';
 
     my $ticket = RT::Model::Ticket->new(current_user => RT->system_user );

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


More information about the Rt-commit mailing list