[Rt-commit] r16261 - in rt/3.8/trunk: . share/html/Search/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Thu Oct 9 15:20:54 EDT 2008
Author: sartak
Date: Thu Oct 9 15:20:52 2008
New Revision: 16261
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Search/Elements/BuildFormatString
rt/3.8/trunk/t/web/custom_search.t
Log:
r71772 at onn: sartak | 2008-09-11 19:49:33 -0400
Fix some warnings in t/web/custom_search
Modified: rt/3.8/trunk/share/html/Search/Elements/BuildFormatString
==============================================================================
--- rt/3.8/trunk/share/html/Search/Elements/BuildFormatString (original)
+++ rt/3.8/trunk/share/html/Search/Elements/BuildFormatString Thu Oct 9 15:20:52 2008
@@ -143,7 +143,8 @@
}
if ( $RemoveCol ) {
- my $index = $CurrentDisplayColumns;
+ # we do this regex match to avoid a non-numeric warning
+ my ($index) = $CurrentDisplayColumns =~ /^(\d+)/;
my $column = $seen[$index];
if ($index) {
delete $seen[$index];
Modified: rt/3.8/trunk/t/web/custom_search.t
==============================================================================
--- rt/3.8/trunk/t/web/custom_search.t (original)
+++ rt/3.8/trunk/t/web/custom_search.t Thu Oct 9 15:20:52 2008
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 10;
+use Test::More tests => 11;
use RT::Test;
my ($baseurl, $m) = RT::Test->started_ok;
my $url = $m->rt_base_url;
@@ -44,7 +44,12 @@
$m->get ($cus_hp);
$m->form_name ('BuildQuery');
-$m->field (CurrentDisplayColumns => 'Requestors');
+
+my $cdc = $m->current_form->find_input('CurrentDisplayColumns');
+my ($requestor_value) = grep { /Requestor/ } $cdc->possible_values;
+ok($requestor_value, "got the requestor value");
+
+$m->field (CurrentDisplayColumns => $requestor_value);
$m->click_button (name => 'RemoveCol') ;
$m->form_name ('BuildQuery');
@@ -60,7 +65,6 @@
# since ticked quese are wanted, we do the invesrsion. So any
# queue added during the quicksearch setting will be unticked.
my $nlinks = $#{$m->find_all_links( text => "General" )};
-warn $nlinks;
$m->get ($cus_qs);
$m->form_name ('Preferences');
$m->untick('Want-General', '1');
More information about the Rt-commit
mailing list