[Rt-commit] r7610 - rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT

clkao at bestpractical.com clkao at bestpractical.com
Sun Apr 22 10:55:18 EDT 2007


Author: clkao
Date: Sun Apr 22 10:55:17 2007
New Revision: 7610

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm

Log:
testing facility for mailgate.

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm	Sun Apr 22 10:55:17 2007
@@ -119,5 +119,21 @@
     return $dbh;
 }
 
+sub open_mailgate_ok {
+    my $class   = shift;
+    my $baseurl = shift;
+    my $queue   = shift || 'general';
+    my $action  = shift || 'correspond';
+    ok(open(my $mail, "|$RT::BinPath/rt-mailgate --url $baseurl --queue $queue --action $action"), "Opened the mailgate - $!");
+    return $mail;
+}
+
+
+sub close_mailgate_ok {
+    my $class = shift;
+    my $mail  = shift;
+    close $mail;
+    is ($? >> 8, 0, "The mail gateway exited normally. yay");
+}
 
 1;


More information about the Rt-commit mailing list