[Rt-commit] r9066 - rtir/branches/2.3-EXPERIMENTAL/t
ruz at bestpractical.com
ruz at bestpractical.com
Sat Sep 15 19:34:04 EDT 2007
Author: ruz
Date: Sat Sep 15 19:34:03 2007
New Revision: 9066
Modified:
rtir/branches/2.3-EXPERIMENTAL/t/021-gnupg.t
Log:
* use infrastructure in a test file, quite tricky right now, but
at least it works
Modified: rtir/branches/2.3-EXPERIMENTAL/t/021-gnupg.t
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/t/021-gnupg.t (original)
+++ rtir/branches/2.3-EXPERIMENTAL/t/021-gnupg.t Sat Sep 15 19:34:03 2007
@@ -2,12 +2,28 @@
use strict;
use warnings;
+
use Test::More tests => 46;
use File::Temp qw(tempdir);
require "t/rtir-test.pl";
+require RT::Test; import RT::Test;
+
+{
+ $RT::Handle->InsertSchema(undef, '/opt/rt3/local/etc/FM');
+ $RT::Handle->InsertACL(undef, '/opt/rt3/local/etc/FM');
-my $agent = default_agent();
+ $RT::Handle = new RT::Handle;
+ $RT::Handle->dbh( undef );
+ RT->ConnectToDatabase;
+
+ local @INC = ('/opt/rt3/local/etc', '/opt/rt3/etc', @INC);
+ $RT::Handle->InsertData('IR/initialdata');
+
+ $RT::Handle = new RT::Handle;
+ $RT::Handle->dbh( undef );
+ RT->ConnectToDatabase;
+}
RT::Test->set_mail_catcher;
@@ -27,6 +43,11 @@
);
ok $queue && $queue->id, 'loaded or created queue';
+my ($baseurl, $agent) = RT::Test->started_ok;
+rtir_user();
+$agent->login( rtir_test_user => 'rtir_test_pass' );
+
+
RT::Test->set_rights(
Principal => 'Everyone',
Right => ['CreateTicket', 'ShowTicket', 'SeeQueue', 'ReplyToTicket', 'ModifyTicket'],
More information about the Rt-commit
mailing list