#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
return (0, 'no connection', "Failed to connect to $dsn as user '$user': ". $DBI::errstr);
}
- RT::ConnectToDatabase();
- RT::InitLogging();
+ unless ($RT::Handle and $RT::Handle->dbh) {
+ RT::ConnectToDatabase();
+ }
require RT::CurrentUser;
my $test_user = new RT::CurrentUser;