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

ruz at bestpractical.com ruz at bestpractical.com
Tue Aug 28 14:40:48 EDT 2007


Author: ruz
Date: Tue Aug 28 14:40:47 2007
New Revision: 8779

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/t/web/crypt-gnupg.t

Log:
 r8693 at cubic-pc (orig r8692):  sartak | 2007-08-23 01:39:57 +0400
  r37973 at gorgoroth:  sartak | 2007-08-22 17:39:17 -0400
  Catch mail coming from RT.. still needs a fix for the test counter mismatch due to forking
 


Modified: rt/branches/3.7-EXPERIMENTAL/t/web/crypt-gnupg.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/t/web/crypt-gnupg.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/t/web/crypt-gnupg.t	Tue Aug 28 14:40:47 2007
@@ -3,9 +3,7 @@
 
 use Test::More tests => 11;
 use RT::Test;
-
-use constant LogoFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif';
-use constant FaviconFile => $RT::MasonComponentRoot .'/NoAuth/images/favicon.png';
+use RT::Action::SendEmail;
 
 eval 'use GnuPG::Interface; 1' or plan skip_all => 'GnuPG required.';
 
@@ -28,6 +26,19 @@
                  passphrase => 'rt-test',
                  'no-permission-warning' => undef);
 
+# catch any outgoing emails
+our @outgoing;
+is (__PACKAGE__, 'main', "We're operating in the main package");
+{
+    no warnings qw/redefine/;
+    sub RT::Action::SendEmail::SendMessage {
+        my $self = shift;
+        my $MIME = shift;
+
+        main::unlike($MIME->body, qr/Some content/, "content was encrypted");
+    }
+}
+
 ok(my $user = RT::User->new($RT::SystemUser));
 ok($user->Load('root'), "Loaded user 'root'");
 $user->SetEmailAddress('recipient at example.com');
@@ -61,3 +72,4 @@
 $m->submit;
 is($m->status, 200, "request successful");
 
+$m->get("$baseurl"); # make sure the server has handled all mail


More information about the Rt-commit mailing list