3 use Test::More qw(no_plan);
5 use lib "/opt/rt3/lib";
8 ok(RT::Init, "Basic initialization and DB connectivity");
12 my $q = RT::Queue->new($RT::SystemUser);
14 $q->Load('regression');
16 die "Regression tests not starting with a clean DB. Bailing";
19 my ($id, $msg) = $q->Create( Name => 'Regression',
20 Description => 'A regression test queue',
21 CorrespondAddress => 'correspond@a',
22 CommentAddress => 'comment@a');
24 isnt($id, 0, "Queue was created sucessfully - $msg");
26 my $q2 = RT::Queue->new($RT::SystemUser);
29 is($q2->id, $id, "Sucessfully loaded the queue again");
30 is($q2->Name, 'Regression');
31 is($q2->Description, 'A regression test queue');
32 is($q2->CorrespondAddress, 'correspond@a');
33 is($q2->CommentAddress, 'comment@a');
37 File::Find::find({wanted => \&wanted_autogen}, 'lib/t/autogen');
38 sub wanted_autogen { /^autogen.*\.t\z/s && require $_; }
40 File::Find::find({wanted => \&wanted_regression}, 'lib/t/regression');
41 sub wanted_regression { /^*\.t\z/s && require $_; }
43 require "/opt/rt3/lib/t/03web.pl";
44 require "/opt/rt3/lib/t/04_send_email.pl";