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

sartak at bestpractical.com sartak at bestpractical.com
Thu Aug 9 14:27:05 EDT 2007


Author: sartak
Date: Thu Aug  9 14:27:05 2007
New Revision: 8479

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-realmail.t

Log:
 r37180 at gorgoroth:  sartak | 2007-08-09 14:26:57 -0400
 Test updates


Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-realmail.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-realmail.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-realmail.t	Thu Aug  9 14:27:05 2007
@@ -23,7 +23,7 @@
 my ($baseurl, $m) = RT::Test->started_ok;
 ok(my $user = RT::User->new($RT::SystemUser));
 ok($user->Load('root'), "Loaded user 'root'");
-$user->SetEmailAddress('recipient at example.com');
+$user->SetEmailAddress('ternus at anduril.mit.edu');
 
 my $eid = 0;
 for my $usage (qw/signed encrypted signed&encrypted/) {
@@ -62,7 +62,7 @@
 
     my $tick = get_latest_ticket_ok();
     is( $tick->Subject,
-        "Email $eid",
+        "test signed message",
         "Created the ticket"
     );
 
@@ -80,23 +80,33 @@
         );
 
         #XXX: maybe RT will have already decrypted this for us
-        unlike($msg->Content,
-               qr/body text/,
-               'incoming mail did NOT have original body');
+        unlike( $msg->Content,
+                qr/body text/,
+                'incoming mail did NOT have original body'
+        );
     }
     else {
         is( $msg->GetHeader('X-RT-Incoming-Encryption'),
             'Not encrypted',
             'recorded incoming mail that is not encrypted'
         );
-        like($msg->Content,
-             qr/body text/,
-             'incoming mail had original body');
+        like( $msg->Content || $attachments[0]->Content,
+              qr/This is a test signed message/,
+              'got original content'
+        );
     }
 
     if ($usage =~ /signed/) {
+        is( $msg->GetHeader('X-RT-Incoming-Signature'),
+            'akjhsd',
+            'recorded incoming mail that is signed'
+        );
     }
     else {
+        is( $msg->GetHeader('X-RT-Incoming-Signature'),
+            undef,
+            'recorded incoming mail that is not signed'
+        );
     }
 
     if ($attachment =~ /attachment/) {


More information about the Rt-commit mailing list