[Rt-commit] r19802 - rtir/2.5/trunk/t

ruz at bestpractical.com ruz at bestpractical.com
Thu May 28 21:13:29 EDT 2009


Author: ruz
Date: Thu May 28 21:13:29 2009
New Revision: 19802

Modified:
   rtir/2.5/trunk/t/rtir-test.pl

Log:
* update state parser according to the recent changes in CF displaying

Modified: rtir/2.5/trunk/t/rtir-test.pl
==============================================================================
--- rtir/2.5/trunk/t/rtir-test.pl	(original)
+++ rtir/2.5/trunk/t/rtir-test.pl	Thu May 28 21:13:29 2009
@@ -60,8 +60,11 @@
     my $state = shift;
     my $desc = shift || "State of the ticket #$id is '$state'";
     display_ticket( $agent, $id );
-    $agent->content =~ qr{State:\s*</td>\s*<td[^>]*?>\s*<span class="cf-value">([\w ]+)</span>}ism;
-    return is($1, $state, $desc);
+    my ($got) = ($agent->content =~ qr{State:\s*</td>\s*<td[^>]*?class="value"[^>]*?>\s*([\w ]+?)\s*</td>}ism);
+    unless ( $got ) {
+        Test::More::diag("Error: couldn't find state value on the page, may be regexp problem");
+    }
+    return is($got, $state, $desc);
 }
 
 sub ticket_is_linked_to_inc {


More information about the Rt-commit mailing list