Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Commit
rt branch, 4.2/smime-v2-strict, updated. rt-4.0.4-506-g0654592
 

Index | Next | Previous | View Flat


jasonmay at bestpractical

Jan 19, 2012, 3:31 PM


Views: 86
Permalink
rt branch, 4.2/smime-v2-strict, updated. rt-4.0.4-506-g0654592

The branch, 4.2/smime-v2-strict has been updated
via 065459231dab2a255cb7efb96d3e57452f3cfe6d (commit)
from 950fcbed8aa5d3129e86a7a5f3d3b515159301ae (commit)

Summary of changes:
t/mail/smime/strict.t | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)

- Log -----------------------------------------------------------------
commit 065459231dab2a255cb7efb96d3e57452f3cfe6d
Author: Jason May <jasonmay [at] bestpractical>
Date: Thu Jan 19 18:27:24 2012 -0500

Use the provided email fixtures for the strict SMIME encryption tests

diff --git a/t/mail/smime/strict.t b/t/mail/smime/strict.t
index df71677..c41eecf 100644
--- a/t/mail/smime/strict.t
+++ b/t/mail/smime/strict.t
@@ -4,6 +4,7 @@ use warnings;

use RT::Test::SMIME tests => 22;
my $test = 'RT::Test::SMIME';
+my $mails_dir = 't/data/smime/mails';

use IPC::Run3 'run3';
use String::ShellQuote 'shell_quote';
@@ -70,25 +71,19 @@ RT::Test->close_mailgate_ok($mail);
{
# test for encrypted mail
my $buf = '';
- run3(
- shell_quote(
- qw(openssl smime -encrypt -des3),
- -from => 'root [at] example',
- -to => 'rt@' . $RT::rtname,
- -subject => "Encrypted message for queue",
- $test->key_path('sender [at] example' ),
- ),
- \"Subject: test\n\norzzzzzz",
- \$buf,
- \*STDERR
- );
+ {
+ local $/;
+ open my $fh, "<$mails_dir/4-encrypted-plain.eml";
+ $buf = <$fh>;
+ close $fh;
+ }

my ($status, $tid) = RT::Test->send_via_mailgate( $buf );
is ($status >> 8, 0, "The mail gateway exited normally");

my $tick = RT::Ticket->new( $RT::SystemUser );
$tick->Load( $tid );
- is( $tick->Subject, 'Encrypted message for queue',
+ is( $tick->Subject, 'Test Email ID:4',
"Created the ticket"
);

@@ -102,7 +97,7 @@ RT::Test->close_mailgate_ok($mail);
'SMIME',
'recorded incoming mail that is encrypted'
);
- like( $attach->Content, qr'orz');
+ like( $attach->Content, qr'This is encrypted message');

is( $orig->GetHeader('Content-Type'), 'application/x-rt-original-message');
}

-----------------------------------------------------------------------
_______________________________________________
Rt-commit mailing list
Rt-commit [at] lists
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit

Subject User Time
rt branch, 4.2/smime-v2-strict, updated. rt-4.0.4-506-g0654592 jasonmay at bestpractical Jan 19, 2012, 3:31 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.