[Rt-commit] r5158 - in rtir/branches/1.9-EXPERIMENTAL: t

ruz at bestpractical.com ruz at bestpractical.com
Wed May 3 19:34:02 EDT 2006


Author: ruz
Date: Wed May  3 19:34:01 2006
New Revision: 5158

Modified:
   rtir/branches/1.9-EXPERIMENTAL/   (props changed)
   rtir/branches/1.9-EXPERIMENTAL/t/rtir-test.pl

Log:
 r1401 at cubic-pc:  cubic | 2006-05-04 03:15:27 +0400
 * better check for state


Modified: rtir/branches/1.9-EXPERIMENTAL/t/rtir-test.pl
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/t/rtir-test.pl	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/t/rtir-test.pl	Wed May  3 19:34:01 2006
@@ -71,9 +71,10 @@
     my $agent = shift;
     my $id = shift;
     my $state = shift;
-    my $desc = shift;
+    my $desc = shift || "State of the ticket #$id is '$state'";
     display_ticket( $agent, $id );
-    return $agent->content_like(qr{State:.*?\Q$state}ism, $desc );
+    $agent->content =~ qr{State:\s*</td>\s*<td[^>]*?>\s*<span class="cf-value">(\w+)</span>}ism;
+    return is($1, $state, $desc);
 }
 
 sub create_user {


More information about the Rt-commit mailing list