[Rt-commit] r14938 - in rtir/branches/2.3-TESTING/t: constituency mail

ruz at bestpractical.com ruz at bestpractical.com
Sat Aug 9 11:46:33 EDT 2008


Author: ruz
Date: Sat Aug  9 11:46:33 2008
New Revision: 14938

Modified:
   rtir/branches/2.3-TESTING/t/021-gnupg-on-create.t
   rtir/branches/2.3-TESTING/t/022-gnupg-on-update.t
   rtir/branches/2.3-TESTING/t/023-gnupg-on-incident.t
   rtir/branches/2.3-TESTING/t/constituency/basics.t
   rtir/branches/2.3-TESTING/t/constituency/email_outgoing.t
   rtir/branches/2.3-TESTING/t/mail/skip_notification.t

Log:
* adjust tests ot use new plugins subsystem

Modified: rtir/branches/2.3-TESTING/t/021-gnupg-on-create.t
==============================================================================
--- rtir/branches/2.3-TESTING/t/021-gnupg-on-create.t	(original)
+++ rtir/branches/2.3-TESTING/t/021-gnupg-on-create.t	Sat Aug  9 11:46:33 2008
@@ -43,6 +43,7 @@
 RT->Config->Set( 'MailPlugins' => 'Auth::MailFrom', 'Auth::GnuPG' );
 
 RT->Config->Set( Plugins => 'RT::FM', 'RT::IR' );
+RT::InitPluginPaths();
 RT::InitPlugins();
 
 my $queue = RT::Test->load_or_create_queue(

Modified: rtir/branches/2.3-TESTING/t/022-gnupg-on-update.t
==============================================================================
--- rtir/branches/2.3-TESTING/t/022-gnupg-on-update.t	(original)
+++ rtir/branches/2.3-TESTING/t/022-gnupg-on-update.t	Sat Aug  9 11:46:33 2008
@@ -43,6 +43,7 @@
 RT->Config->Set( 'MailPlugins' => 'Auth::MailFrom', 'Auth::GnuPG' );
 
 RT->Config->Set( Plugins => 'RT::FM', 'RT::IR' );
+RT::InitPluginPaths();
 RT::InitPlugins();
 
 my $queue = RT::Test->load_or_create_queue(

Modified: rtir/branches/2.3-TESTING/t/023-gnupg-on-incident.t
==============================================================================
--- rtir/branches/2.3-TESTING/t/023-gnupg-on-incident.t	(original)
+++ rtir/branches/2.3-TESTING/t/023-gnupg-on-incident.t	Sat Aug  9 11:46:33 2008
@@ -45,6 +45,7 @@
 RT->Config->Set( 'MailPlugins' => 'Auth::MailFrom', 'Auth::GnuPG' );
 
 RT->Config->Set( 'Plugins' => 'RT::FM', 'RT::IR' );
+RT::InitPluginPaths();
 RT::InitPlugins();
 
 my $queue = RT::Test->load_or_create_queue(

Modified: rtir/branches/2.3-TESTING/t/constituency/basics.t
==============================================================================
--- rtir/branches/2.3-TESTING/t/constituency/basics.t	(original)
+++ rtir/branches/2.3-TESTING/t/constituency/basics.t	Sat Aug  9 11:46:33 2008
@@ -4,10 +4,40 @@
 use warnings;
 
 use Test::More tests => 172;
+
+use lib qw(/opt/rt3/local/lib /opt/rt3/lib);
+require RT::Test; import RT::Test;
 require "t/rtir-test.pl";
 
+{
+    $RT::Handle->InsertSchema(undef, '/opt/rt3/local/etc/FM');
+    $RT::Handle->InsertACL(undef, '/opt/rt3/local/etc/FM');
+
+    $RT::Handle = new RT::Handle;
+    $RT::Handle->dbh( undef );
+    RT->ConnectToDatabase;
+
+    local @INC = ('/opt/rt3/local/etc', '/opt/rt3/etc', @INC);
+    RT->Config->LoadConfig(File => "IR/RTIR_Config.pm");
+    $RT::Handle->InsertData('IR/initialdata');
+
+    $RT::Handle = new RT::Handle;
+    $RT::Handle->dbh( undef );
+    RT->ConnectToDatabase;
+}
+
+RT::Test->set_mail_catcher;
+
+RT->Config->Set( Plugins => 'RT::FM', 'RT::IR' );
+RT::InitPluginPaths();
+RT::InitPlugins();
+
 use_ok('RT::IR');
 
+my ($baseurl, $agent) = RT::Test->started_ok;
+rtir_user();
+$agent->login( rtir_test_user => 'rtir_test_pass' );
+
 my $cf;
 diag "load and check basic properties of the CF" if $ENV{'TEST_VERBOSE'};
 {
@@ -46,9 +76,6 @@
     }
 }
 
-my $agent = default_agent();
-my $rtir_user = rtir_user();
-
 diag "check that there is no option to set 'no value' on create" if $ENV{'TEST_VERBOSE'};
 {
     my $default = RT->Config->Get('_RTIR_Constituency_default');

Modified: rtir/branches/2.3-TESTING/t/constituency/email_outgoing.t
==============================================================================
--- rtir/branches/2.3-TESTING/t/constituency/email_outgoing.t	(original)
+++ rtir/branches/2.3-TESTING/t/constituency/email_outgoing.t	Sat Aug  9 11:46:33 2008
@@ -10,6 +10,7 @@
 require "t/rtir-test.pl";
 
 RT->Config->Set( 'Plugins' => 'RT::FM', 'RT::IR' );
+RT::InitPluginPaths();
 RT::InitPlugins();
 
 

Modified: rtir/branches/2.3-TESTING/t/mail/skip_notification.t
==============================================================================
--- rtir/branches/2.3-TESTING/t/mail/skip_notification.t	(original)
+++ rtir/branches/2.3-TESTING/t/mail/skip_notification.t	Sat Aug  9 11:46:33 2008
@@ -30,6 +30,7 @@
 RT->Config->Set( '_RTIR_Constituency_default' => 'EDUNET' );
 
 RT->Config->Set( 'Plugins' => 'RT::FM', 'RT::IR' );
+RT::InitPluginPaths();
 RT::InitPlugins();
 
 RT::Test->set_mail_catcher;


More information about the Rt-commit mailing list