[Rt-commit] r18810 - rt/3.999/trunk/t/web

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Mar 16 09:22:08 EDT 2009


Author: sunnavy
Date: Mon Mar 16 09:22:06 2009
New Revision: 18810

Modified:
   rt/3.999/trunk/t/web/dashboards.t

Log:
tiny refactor so we do not need to write magic number in t/web/dashboards.t

Modified: rt/3.999/trunk/t/web/dashboards.t
==============================================================================
--- rt/3.999/trunk/t/web/dashboards.t	(original)
+++ rt/3.999/trunk/t/web/dashboards.t	Mon Mar 16 09:22:06 2009
@@ -224,7 +224,8 @@
 $m->follow_link_ok({text => 'Queries'});
 
 $m->form_name('Dashboard-Searches-body');
-$m->field('Searches-body-Available' => ['search-8-RT::Model::User-22']); # XXX: :( :(
+my ( $personal_search_option ) = $m->content =~ /(search-\d+-RT::Model::User-\d+)/;
+$m->field('Searches-body-Available' => [$personal_search_option]);
 $m->click_button(name => 'add');
 $m->content_contains("Dashboard updated");
 


More information about the Rt-commit mailing list