[Rt-commit] rt branch, 4.0/test-warnings, updated. rt-4.0.0-182-gb4dbaa4

Shawn Moore sartak at bestpractical.com
Tue May 3 15:06:56 EDT 2011


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

Summary of changes:
 t/api/groups.t          |    2 +-
 t/api/users.t           |    2 +-
 t/ticket/add-watchers.t |    3 +--
 t/web/rights1.t         |    3 +--
 4 files changed, 4 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit b4dbaa458fc7855c7d8af37b84aeabf03af010b4
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue May 3 15:06:41 2011 -0400

    Use method calls to avoid once warnings

diff --git a/t/api/groups.t b/t/api/groups.t
index e4044a4..33f0671 100644
--- a/t/api/groups.t
+++ b/t/api/groups.t
@@ -63,7 +63,7 @@ ok($global_admin_cc->id, "Found the global admincc group");
 my $groups = RT::Groups->new(RT->SystemUser);
 $groups->WithRight(Right => 'OwnTicket', Object => $q);
 is($groups->Count, 1);
-($id, $msg) = $global_admin_cc->PrincipalObj->GrantRight(Right =>'OwnTicket', Object=> $RT::System);
+($id, $msg) = $global_admin_cc->PrincipalObj->GrantRight(Right =>'OwnTicket', Object=> RT->System);
 ok ($id,$msg);
 ok (!$testuser->HasRight(Object => $q, Right => 'OwnTicket') , "The test user does not have the right to own tickets in the test queue");
 ($id, $msg) = $q->AddWatcher(Type => 'AdminCc', PrincipalId => $testuser->id);
diff --git a/t/api/users.t b/t/api/users.t
index 646d07b..1f3a487 100644
--- a/t/api/users.t
+++ b/t/api/users.t
@@ -10,7 +10,7 @@ RT::System->AddRights(
     no warnings qw(redefine once);
 
 ok(my $users = RT::Users->new(RT->SystemUser));
-$users->WhoHaveRight(Object =>$RT::System, Right =>'SuperUser');
+$users->WhoHaveRight(Object => RT->System, Right =>'SuperUser');
 is($users->Count , 1, "There is one privileged superuser - Found ". $users->Count );
 # TODO: this wants more testing
 
diff --git a/t/ticket/add-watchers.t b/t/ticket/add-watchers.t
index 2e1acf1..e49c694 100644
--- a/t/ticket/add-watchers.t
+++ b/t/ticket/add-watchers.t
@@ -49,7 +49,6 @@ use RT::Test nodata => 1, tests => 32;
 
 use strict;
 use warnings;
-no warnings 'once';
 
 use RT::Queue;
 use RT::User;
@@ -61,7 +60,7 @@ use RT::CurrentUser;
 # clear all global right
 my $acl = RT::ACL->new(RT->SystemUser);
 $acl->Limit( FIELD => 'RightName', OPERATOR => '!=', VALUE => 'SuperUser' );
-$acl->LimitToObject( $RT::System );
+$acl->LimitToObject( RT->System );
 while( my $ace = $acl->Next ) {
 	$ace->Delete;
 }
diff --git a/t/web/rights1.t b/t/web/rights1.t
index e4af752..24e5c34 100644
--- a/t/web/rights1.t
+++ b/t/web/rights1.t
@@ -24,7 +24,6 @@ my $cookie_jar = HTTP::Cookies->new;
 
 $agent->cookie_jar($cookie_jar);
 
-no warnings 'once';
 # get the top page
 $agent->login( $user_obj->Name, 'customer');
 
@@ -36,7 +35,7 @@ ok(!$agent->find_link( url => "$RT::WebPath/User/Prefs.html",
 
 # Now test for their presence, one at a time.  Sleep for a bit after
 # ACL changes, thanks to the 10s ACL cache.
-my ($grantid,$grantmsg) =$user_obj->PrincipalObj->GrantRight(Right => 'ShowConfigTab', Object => $RT::System);
+my ($grantid,$grantmsg) =$user_obj->PrincipalObj->GrantRight(Right => 'ShowConfigTab', Object => RT->System);
 
 ok($grantid,$grantmsg);
 

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


More information about the Rt-commit mailing list