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

ruz at bestpractical.com ruz at bestpractical.com
Mon Apr 17 17:23:08 EDT 2006


Author: ruz
Date: Mon Apr 17 17:23:07 2006
New Revision: 5045

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

Log:
 r1310 at cubic-pc:  cubic | 2006-04-18 01:29:09 +0400
 * test that state of the ticket is really rejected


Modified: rtir/branches/1.9-EXPERIMENTAL/t/010-bulk-reject.t
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/t/010-bulk-reject.t	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/t/010-bulk-reject.t	Mon Apr 17 17:23:07 2006
@@ -2,7 +2,7 @@
 
 use strict;
 use warnings;
-use Test::More no_plan => 1;
+use Test::More plan => 45;
 
 require "t/rtir-test.pl";
 
@@ -47,3 +47,6 @@
     ok_and_content_like($agent, qr{New unlinked Incident Reports}, 'we on the main page');
 }
 
+foreach( @irs ) {
+    ticket_state_is( $agent, $_, 'rejected', "Ticket #$_ is rejected" );
+}

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	Mon Apr 17 17:23:07 2006
@@ -67,6 +67,15 @@
     $agent->get_ok("$RT::WebURL/RTIR/Display.html?id=$id", "Loaded Display page");
 }
 
+sub ticket_state_is {
+    my $agent = shift;
+    my $id = shift;
+    my $state = shift;
+    my $desc = shift;
+    display_ticket( $agent, $id );
+    return $agent->content_like(qr{State:.*?\Q$state}ism, $desc );
+}
+
 sub create_user {
     my $user_obj = rtir_user();
 


More information about the Rt-commit mailing list