diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-08-25 15:06:19 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-08-25 15:06:19 -0700 |
commit | cbfeb5f6b7490f78361318ce6290bfb442dbfcbe (patch) | |
tree | e6409692bc2376649eeda94344f0a7f578a75428 /rt/lib/RT/Test | |
parent | 8ffd7de981603a189cd0ea62ca948eaf3f66ca49 (diff) | |
parent | 5b5eb87bf66f1fac003a13dc2db48e8970c5c986 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'rt/lib/RT/Test')
-rw-r--r-- | rt/lib/RT/Test/Apache.pm | 2 | ||||
-rw-r--r-- | rt/lib/RT/Test/Email.pm | 2 | ||||
-rw-r--r-- | rt/lib/RT/Test/GnuPG.pm | 16 | ||||
-rw-r--r-- | rt/lib/RT/Test/SMIME.pm | 4 | ||||
-rw-r--r-- | rt/lib/RT/Test/Shredder.pm | 2 | ||||
-rw-r--r-- | rt/lib/RT/Test/Web.pm | 2 |
6 files changed, 16 insertions, 12 deletions
diff --git a/rt/lib/RT/Test/Apache.pm b/rt/lib/RT/Test/Apache.pm index e7e3cdd11..7dc308330 100644 --- a/rt/lib/RT/Test/Apache.pm +++ b/rt/lib/RT/Test/Apache.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test/Email.pm b/rt/lib/RT/Test/Email.pm index 0a44aee3e..c407592ac 100644 --- a/rt/lib/RT/Test/Email.pm +++ b/rt/lib/RT/Test/Email.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test/GnuPG.pm b/rt/lib/RT/Test/GnuPG.pm index e5a08b75a..d803399e0 100644 --- a/rt/lib/RT/Test/GnuPG.pm +++ b/rt/lib/RT/Test/GnuPG.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -64,9 +64,9 @@ sub import { my %args = @_; my $t = $class->builder; - $t->plan( skip_all => 'GnuPG required.' ) + RT::Test::plan( skip_all => 'GnuPG required.' ) unless GnuPG::Interface->require; - $t->plan( skip_all => 'gpg executable is required.' ) + RT::Test::plan( skip_all => 'gpg executable is required.' ) unless RT::Test->find_executable('gpg'); $class->SUPER::import(%args); @@ -204,13 +204,17 @@ sub check_text_emails { my $content = $type eq 'email' ? "Some content" - : "Attachment content"; + : $args{Attachment}; if ( $args{'Encrypt'} ) { - unlike $mail, qr/$content/, "outgoing $type was encrypted"; + unlike $mail, qr/$content/, "outgoing $type is not in plaintext"; + my $entity = RT::Test::parse_mail($mail); + my @res = RT::Crypt->VerifyDecrypt(Entity => $entity); + like $res[0]{'status'}, qr/DECRYPTION_OKAY/, "Decrypts OK"; + like $entity->as_string, qr/$content/, "outgoing decrypts to contain $type content"; } else { like $mail, qr/$content/, "outgoing $type was not encrypted"; - } + } next unless $type eq 'email'; diff --git a/rt/lib/RT/Test/SMIME.pm b/rt/lib/RT/Test/SMIME.pm index 36b436202..cc5a5ee4c 100644 --- a/rt/lib/RT/Test/SMIME.pm +++ b/rt/lib/RT/Test/SMIME.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -61,7 +61,7 @@ sub import { my %args = @_; my $t = $class->builder; - $t->plan( skip_all => 'openssl executable is required.' ) + RT::Test::plan( skip_all => 'openssl executable is required.' ) unless RT::Test->find_executable('openssl'); require RT::Crypt; diff --git a/rt/lib/RT/Test/Shredder.pm b/rt/lib/RT/Test/Shredder.pm index 4ee0b3589..44a2fb39f 100644 --- a/rt/lib/RT/Test/Shredder.pm +++ b/rt/lib/RT/Test/Shredder.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/lib/RT/Test/Web.pm b/rt/lib/RT/Test/Web.pm index b03e82227..ab1a421db 100644 --- a/rt/lib/RT/Test/Web.pm +++ b/rt/lib/RT/Test/Web.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) |