[Rt-commit] r10841 - rt/branches/3.7-RTIR-RELENG/t/mail

ruz at bestpractical.com ruz at bestpractical.com
Thu Feb 14 10:00:15 EST 2008


Author: ruz
Date: Thu Feb 14 10:00:12 2008
New Revision: 10841

Modified:
   rt/branches/3.7-RTIR-RELENG/t/mail/crypt-gnupg.t

Log:
* error handle is not always filled

Modified: rt/branches/3.7-RTIR-RELENG/t/mail/crypt-gnupg.t
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/t/mail/crypt-gnupg.t	(original)
+++ rt/branches/3.7-RTIR-RELENG/t/mail/crypt-gnupg.t	Thu Feb 14 10:00:12 2008
@@ -5,12 +5,11 @@
 use Test::More;
 eval 'use GnuPG::Interface; 1' or plan skip_all => 'GnuPG required.';
 
-plan tests => 94;
+plan tests => 92;
 use RT::Test nodata => 1;
 
 RT->Config->Set( LogToScreen => 'debug' );
 RT->Config->Set( LogStackTraces => 'error' );
-use Data::Dumper;
 
 use File::Spec ();
 use Cwd;
@@ -75,8 +74,7 @@
     );
     my %res = RT::Crypt::GnuPG::SignEncrypt( Entity => $entity, Encrypt => 0, Passphrase => '' );
     ok( $res{'exit_code'}, "couldn't sign without passphrase");
-    ok( $res{'error'}, "error is here" );
-    ok( $res{'logger'}, "log is here as well" );
+    ok( $res{'error'} || $res{'logger'}, "error is here" );
 
     my @status = RT::Crypt::GnuPG::ParseStatus( $res{'status'} );
     is( scalar @status, 1, 'one record');
@@ -93,8 +91,7 @@
     );
     my %res = RT::Crypt::GnuPG::SignEncrypt( Entity => $entity, Encrypt => 0, Passphrase => 'wrong' );
     ok( $res{'exit_code'}, "couldn't sign with bad passphrase");
-    ok( $res{'error'}, "error is here" );
-    ok( $res{'logger'}, "log is here as well" );
+    ok( $res{'error'} || $res{'logger'}, "error is here" );
 
     my @status = RT::Crypt::GnuPG::ParseStatus( $res{'status'} );
     is( scalar @status, 1, 'one record');


More information about the Rt-commit mailing list