[Bps-public-commit] r15177 - in RT-Extension-CommandByEmail: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Aug 14 21:32:12 EDT 2008


Author: sartak
Date: Thu Aug 14 21:32:11 2008
New Revision: 15177

Modified:
   RT-Extension-CommandByEmail/   (props changed)
   RT-Extension-CommandByEmail/t/00.load.t

Log:
 r69662 at onn:  sartak | 2008-08-14 21:32:06 -0400
 Test that the user added the extension and plugin to their config


Modified: RT-Extension-CommandByEmail/t/00.load.t
==============================================================================
--- RT-Extension-CommandByEmail/t/00.load.t	(original)
+++ RT-Extension-CommandByEmail/t/00.load.t	Thu Aug 14 21:32:11 2008
@@ -1,4 +1,4 @@
-use Test::More tests => 3;
+use Test::More tests => 5;
 
 BEGIN { require 't/utils.pl' }
 BEGIN {
@@ -9,3 +9,22 @@
 }
 
 diag( "Testing RT::Extension::CommandByMail $RT::Extension::CommandByMail::VERSION" );
+
+my $old_config = $RT::VERSION =~ /3\.(\d+)/ && $1 < 7;
+
+my @plugins = $old_config
+            ? @RT::Plugins
+            : RT->Config->Get('Plugins');
+
+my @mail_plugins = $old_config
+                 ? @RT::MailPlugins
+                 : RT->Config->Get('MailPlugins');
+
+my $complain = 0;
+ok((grep { $_ eq 'RT::Extension::CommandByMail' } @plugins), "RT::Extension::CommandByMail is in your config's \@Plugins") or $complain = 1;
+ok((grep { $_ eq 'Filter::TakeAction' } @mail_plugins), "Filter::TakeAction is in your config's \@MailPlugins") or $complain = 1;
+
+if ($complain) {
+    diag "Please read through the entire INSTALL documentation for directions on how to set up your config for testing and using this plugin.";
+}
+



More information about the Bps-public-commit mailing list