[Rt-commit] r10318 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Sun Jan 13 17:53:02 EST 2008


Author: ruz
Date: Sun Jan 13 17:53:02 2008
New Revision: 10318

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t

Log:
 r10142 at cubic-pc:  cubic | 2008-01-09 09:20:08 +0300
 * check that mailgate doesn't suffer from empty Reply-To:


Modified: rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/t/mail/gateway.t	Sun Jan 13 17:53:02 2008
@@ -56,7 +56,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 153;
+use Test::More tests => 159;
 
 use RT::Test config => 'Set( $UnsafeEmailCommands, 1);';
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -583,6 +583,29 @@
     );
 }
 
+diag "check that mailgate doesn't suffer from empty Reply-To:" if $ENV{'TEST_VERBOSE'};
+{
+    my $text = <<EOF;
+From: root\@localhost
+Reply-To: 
+To: rtemail\@@{[RT->Config->Get('rtname')]}
+Subject: test
+Content-Type: text/plain; charset="utf-8"
+
+test
+EOF
+    my ($status, $id) = RT::Test->send_via_mailgate($text);
+    is ($status >> 8, 0, "The mail gateway exited normally");
+    ok ($id, "created ticket");
+
+    my $tick = latest_ticket();
+    isa_ok ($tick, 'RT::Ticket');
+    ok ($tick->Id, "found ticket ". $tick->Id);
+    is ($tick->Id, $id, "correct ticket");
+
+    like $tick->RequestorAddresses, qr/root\@localhost/, 'correct requestor';
+}
+
 
 my ($val,$msg) = $everyone_group->PrincipalObj->RevokeRight(Right => 'CreateTicket');
 ok ($val, $msg);


More information about the Rt-commit mailing list