[Rt-commit] r6096 - in RT-Extension-TicketAging: .

schwern at bestpractical.com schwern at bestpractical.com
Thu Sep 28 19:26:06 EDT 2006


Author: schwern
Date: Thu Sep 28 19:26:06 2006
New Revision: 6096

Added:
   RT-Extension-TicketAging/t/07.reopen.t
Modified:
   RT-Extension-TicketAging/   (props changed)

Log:
 r19436 at Master-Windhund-IV:  schwern | 2006-09-28 16:18:16 -0700
 Simple test to check the behavior of reopening a ticket.


Added: RT-Extension-TicketAging/t/07.reopen.t
==============================================================================
--- (empty file)
+++ RT-Extension-TicketAging/t/07.reopen.t	Thu Sep 28 19:26:06 2006
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More qw(no_plan);
+
+BEGIN { require 't/utils.pl' }
+RT::Init();
+
+verbose("Reopening a finished ticket should reactivate it");
+{
+    my $ticket = RT::Ticket->new( $RT::SystemUser );
+    ok $ticket->Create( Queue => 'General', Status => 'resolved' );
+
+    run_exec_ok;
+
+    $ticket->Load;
+    is $ticket->FirstCustomFieldValue("Age"), 'Finished';
+
+    # reopen
+    $ticket->Create( Queue => 'General', Status => 'open' );
+
+    run_exec_ok;
+
+    is $ticket->FirstCustomFieldValue("Age"), 'Active';
+}


More information about the Rt-commit mailing list