[Rt-commit] rt branch, 4.0/test-warnings, updated. rt-4.0.0-181-g34654ad

Shawn Moore sartak at bestpractical.com
Tue May 3 15:01:11 EDT 2011


The branch, 4.0/test-warnings has been updated
       via  34654adb166ca93dee35954698281bd45b384aa7 (commit)
      from  be279e5f4594a64996300070a84ad8c6d556aca4 (commit)

Summary of changes:
 t/articles/class.t |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 34654adb166ca93dee35954698281bd45b384aa7
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue May 3 15:00:31 2011 -0400

    Use methods instead of $RT::System and $RT::SystemUser

diff --git a/t/articles/class.t b/t/articles/class.t
index 6dd4916..886ad38 100644
--- a/t/articles/class.t
+++ b/t/articles/class.t
@@ -9,10 +9,6 @@ use_ok 'RT::Articles';
 use_ok 'RT::Classes';
 use_ok 'RT::Class';
 
-$RT::SystemUser || die ;# just shut up the warning
-$RT::System     || die; # just shut up the warning;
-
-
 my $root = RT::CurrentUser->new('root');
 ok ($root->Id, "Loaded root");
 my $cl = RT::Class->new($root);
@@ -42,7 +38,7 @@ ok($cl->id, "Loaded the class we want");
 
 # Create a new user. make sure they can't create a class
 
-my $u= RT::User->new($RT::SystemUser);
+my $u= RT::User->new(RT->SystemUser);
 $u->Create(Name => "ArticlesTest".time, Privileged => 1);
 ok ($u->Id, "Created a new user");
 
@@ -54,7 +50,7 @@ ok (UNIVERSAL::isa($cl, 'RT::Class'), "the new class is a class");
 
 
 ok (!$id, $msg. "- Can not create classes as a random new user - " .$u->Id);
-$u->PrincipalObj->GrantRight(Right =>'AdminClass', Object => $RT::System);
+$u->PrincipalObj->GrantRight(Right =>'AdminClass', Object => RT->System);
 ($id, $msg) = $cl->Create(Name => 'Test-nobody-'.$$, Description => 'A test class');
 
 ok ($id, $msg. "- Can create classes as a random new user after ACL grant");

-----------------------------------------------------------------------


More information about the Rt-commit mailing list