[Rt-commit] r7621 - rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail
clkao at bestpractical.com
clkao at bestpractical.com
Mon Apr 23 04:55:29 EDT 2007
Author: clkao
Date: Mon Apr 23 04:55:28 2007
New Revision: 7621
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-incoming.t
Log:
Failing test for signing with someone else's key
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-incoming.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-incoming.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/gnupg-incoming.t Mon Apr 23 04:55:28 2007
@@ -1,6 +1,6 @@
#!/usr/bin/perl
use strict;
-use Test::More tests => 32;
+use Test::More tests => 36;
use File::Temp;
use RT::Test;
use Cwd 'getcwd';
@@ -197,6 +197,38 @@
like( $attach->Content, qr'orz');
}
+# test for signed mail by other key
+$buf = '';
+
+run3(
+ shell_quote(
+ qw(gpg --armor --sign),
+ '--default-key' => 'rt at example.com',
+ '--homedir' => $homedir,
+ '--passphrase' => 'test',
+ ),
+ \"should not be there\r\n",
+ \$buf,
+ \*STDOUT
+);
+
+$mail = RT::Test->open_mailgate_ok($baseurl);
+print $mail <<"EOF";
+From: recipient\@example.com
+To: general\@$RT::rtname
+Subject: signed message for queue
+
+$buf
+EOF
+RT::Test->close_mailgate_ok($mail);
+
+{
+ my $tick = get_latest_ticket_ok();
+ my $txn = $tick->Transactions->First;
+ my $attach = $txn->Attachments->First;
+ unlike( $attach->Content, qr'should not be there');
+}
+
sub get_latest_ticket_ok {
my $tickets = RT::Tickets->new($RT::SystemUser);
$tickets->OrderBy( FIELD => 'id', ORDER => 'DESC' );
More information about the Rt-commit
mailing list