[Rt-commit] r7796 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: . t/api
t/delegation t/shredder
clsung at bestpractical.com
clsung at bestpractical.com
Wed May 9 11:13:50 EDT 2007
Author: clsung
Date: Wed May 9 11:13:46 2007
New Revision: 7796
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/ (props changed)
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/00-compile.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ace.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/action-createtickets.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attachment.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/condition-ownerchange.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/currentuser.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/customfield.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/emailparser.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/group.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/groups.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/i18n.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/link.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/queue.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/record.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/rt.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/scrip.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/searchbuilder.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/system.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/template.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ticket.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/tickets.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/user.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/users.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/cleanup_stalled.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/revocation.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/savedsearch.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/shredder/00load.t
Log:
r893 at going04: clsung | 2007-05-09 11:13:16 +0800
local branch
r1019 at going04: clsung | 2007-05-09 16:45:40 +0800
- Add 'use strict; use warnings;'
- fix relative warnings (such as Bareword, 'use strict ref;', etc.)
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/00-compile.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/00-compile.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/00-compile.t Wed May 9 11:13:46 2007
@@ -1,3 +1,5 @@
+use strict;
+use warnings;
use Test::More tests => 32;
require_ok("RT");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ace.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ace.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ace.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -34,7 +36,7 @@
undef $main::_STDOUT_;
undef $main::_STDERR_;
-use_ok(RT::User);
+use_ok('RT::User');
my $user_a = RT::User->new($RT::SystemUser);
$user_a->Create( Name => 'DelegationA', Privileged => 1);
ok ($user_a->Id, "Created delegation user a");
@@ -44,7 +46,7 @@
ok ($user_b->Id, "Created delegation user b");
-use_ok(RT::Queue);
+use_ok('RT::Queue');
my $q = RT::Queue->new($RT::SystemUser);
$q->Create(Name =>'DelegationTest');
ok ($q->Id, "Created a delegation test queue");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/action-createtickets.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/action-createtickets.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/action-createtickets.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -9,11 +11,11 @@
undef $main::_STDERR_;
ok (require RT::Action::CreateTickets);
-use_ok(RT::Scrip);
-use_ok(RT::Template);
-use_ok(RT::ScripAction);
-use_ok(RT::ScripCondition);
-use_ok(RT::Ticket);
+use_ok('RT::Scrip');
+use_ok('RT::Template');
+use_ok('RT::ScripAction');
+use_ok('RT::ScripCondition');
+use_ok('RT::Ticket');
my $approvalsq = RT::Queue->new($RT::SystemUser);
$approvalsq->Create(Name => 'Approvals');
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attachment.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attachment.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/attachment.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/condition-ownerchange.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/condition-ownerchange.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/condition-ownerchange.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/currentuser.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/currentuser.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/currentuser.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/customfield.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/customfield.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/customfield.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -8,7 +10,7 @@
undef $main::_STDOUT_;
undef $main::_STDERR_;
-use_ok(RT::CustomField);
+use_ok('RT::CustomField');
ok(my $cf = RT::CustomField->new($RT::SystemUser));
ok(my ($id, $msg)= $cf->Create( Name => 'TestingCF',
Queue => '0',
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/emailparser.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/emailparser.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/emailparser.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -31,8 +33,8 @@
undef $main::_STDOUT_;
undef $main::_STDERR_;
- at before = ("rt\@example.com", "frt\@example.com");
- at after = ("frt\@example.com");
+my @before = ("rt\@example.com", "frt\@example.com");
+my @after = ("frt\@example.com");
ok(eq_array(RT::EmailParser::CullRTAddresses("", at before), at after), "CullRTAddresses only culls RT addresses");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/group.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/group.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/group.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -42,7 +44,7 @@
# Group 2 how has 1, g1->{1, 2,3}
my $group_3 = RT::Group->new($RT::SystemUser);
-ok (($id_3, $msg) = $group_3->CreateUserDefinedGroup( Name => 'TestGroup3', Description => 'A second test group'), 'Created a new group');
+ok (my ($id_3, $msg) = $group_3->CreateUserDefinedGroup( Name => 'TestGroup3', Description => 'A second test group'), 'Created a new group');
ok ($id_3 != 0, "Created group 3 ok - $msg");
ok (($id,$msg) =$group_3->AddMember($group_2->PrincipalId), "Made TestGroup a member of testgroup2");
ok($id, $msg);
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/groups.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/groups.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/groups.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -104,7 +106,7 @@
*RTx::System::id = *RTx::System::Id;
my $ace = RT::Record->new($RT::SystemUser);
$ace->Table('ACL');
-$ace->_BuildTableAttributes unless ($_TABLE_ATTR->{ref($self)});
+$ace->_BuildTableAttributes unless ($RT::Record::_TABLE_ATTR->{ref($ace)});
($id, $msg) = $ace->Create( PrincipalId => $RTxGroup->id, PrincipalType => 'Group', RightName => 'RTxGroupRight', ObjectType => 'RTx::System', ObjectId => 1);
ok ($id, "ACL for RTxSysObj created");
@@ -127,7 +129,7 @@
$ace = RT::Record->new($RT::SystemUser);
$ace->Table('ACL');
-$ace->_BuildTableAttributes unless ($_TABLE_ATTR->{ref($self)});
+$ace->_BuildTableAttributes unless ($RT::Record::_TABLE_ATTR->{ref($ace)});
($id, $msg) = $ace->Create( PrincipalId => $RTxGroup->id, PrincipalType => 'Group', RightName => 'RTxGroupRight', ObjectType => 'RTx::System::Record', ObjectId => 5 );
ok ($id, "ACL for RTxObj created");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/i18n.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/i18n.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/i18n.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -8,7 +10,7 @@
undef $main::_STDOUT_;
undef $main::_STDERR_;
-use_ok (RT::I18N);
+use_ok ('RT::I18N');
ok(RT::I18N->Init);
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/link.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/link.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/link.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/queue.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/queue.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/queue.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -84,13 +86,13 @@
ok ($group->Id, "Found the requestors object for this Queue");
-ok ((my $add_id, $add_msg) = $Queue->AddWatcher(Type => 'Cc', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
+ok (my ($add_id, $add_msg) = $Queue->AddWatcher(Type => 'Cc', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
ok ($add_id, "Add succeeded: ($add_msg)");
ok(my $bob = RT::User->new($RT::SystemUser), "Creating a bob rt::user");
$bob->LoadByEmail('bob at fsck.com');
ok($bob->Id, "Found the bob rt user");
ok ($Queue->IsWatcher(Type => 'Cc', PrincipalId => $bob->PrincipalId), "The Queue actually has bob at fsck.com as a requestor");;
-ok ((my $add_id, $add_msg) = $Queue->DeleteWatcher(Type =>'Cc', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
+ok (($add_id, $add_msg) = $Queue->DeleteWatcher(Type =>'Cc', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
ok (!$Queue->IsWatcher(Type => 'Cc', Principal => $bob->PrincipalId), "The Queue no longer has bob at fsck.com as a requestor");;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/record.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/record.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/record.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/rt.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/rt.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/rt.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/scrip.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/scrip.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/scrip.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/searchbuilder.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/searchbuilder.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/searchbuilder.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -19,7 +21,7 @@
undef $main::_STDOUT_;
undef $main::_STDERR_;
-use_ok(RT::Queues);
+use_ok('RT::Queues');
ok(my $queues = RT::Queues->new($RT::SystemUser), 'Created a queues object');
ok( $queues->UnLimit(),'Unlimited the result set of the queues object');
my $items = $queues->ItemsArrayRef();
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/system.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/system.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/system.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/template.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/template.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/template.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ticket.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ticket.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/ticket.t Wed May 9 11:13:46 2007
@@ -1,5 +1,8 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
+use Data::Dumper;
use RT;
use RT::Test;
@@ -8,11 +11,11 @@
undef $main::_STDOUT_;
undef $main::_STDERR_;
-use_ok ( RT::Queue);
+use_ok ('RT::Queue');
ok(my $testqueue = RT::Queue->new($RT::SystemUser));
ok($testqueue->Create( Name => 'ticket tests'));
ok($testqueue->Id != 0);
-use_ok(RT::CustomField);
+use_ok('RT::CustomField');
ok(my $testcf = RT::CustomField->new($RT::SystemUser));
my ($ret, $cmsg) = $testcf->Create( Name => 'selectmulti',
Queue => $testqueue->id,
@@ -33,7 +36,7 @@
ok($testcf->Values->Count == 3);
-use_ok(RT::Ticket);
+use_ok('RT::Ticket');
my $u = RT::User->new($RT::SystemUser);
$u->Load("root");
@@ -162,13 +165,13 @@
ok ($ticket->IsWatcher(Type => 'Requestor', PrincipalId => $jesse->PrincipalId), "The ticket actually has jesse at fsck.com as a requestor");
-ok ((my $add_id, $add_msg) = $ticket->AddWatcher(Type => 'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
+ok (my ($add_id, $add_msg) = $ticket->AddWatcher(Type => 'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
ok ($add_id, "Add succeeded: ($add_msg)");
ok(my $bob = RT::User->new($RT::SystemUser), "Creating a bob rt::user");
$bob->LoadByEmail('bob at fsck.com');
ok($bob->Id, "Found the bob rt user");
ok ($ticket->IsWatcher(Type => 'Requestor', PrincipalId => $bob->PrincipalId), "The ticket actually has bob at fsck.com as a requestor");;
-ok ((my $add_id, $add_msg) = $ticket->DeleteWatcher(Type =>'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
+ok ( ($add_id, $add_msg) = $ticket->DeleteWatcher(Type =>'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
ok (!$ticket->IsWatcher(Type => 'Requestor', Principal => $bob->PrincipalId), "The ticket no longer has bob at fsck.com as a requestor");;
@@ -195,7 +198,7 @@
my $t = RT::Ticket->new($RT::SystemUser);
ok($t->Create(Queue => 'general', Subject => 'SquelchTest'));
-is($#{$t->SquelchMailTo}, -1, "The ticket has no squelched recipients");
+is(scalar $t->SquelchMailTo, 0, "The ticket has no squelched recipients");
my @returned = $t->SquelchMailTo('nobody at example.com');
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/tickets.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/tickets.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/tickets.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-fsck_com_rt.t Wed May 9 11:13:46 2007
@@ -1,3 +1,5 @@
+use strict;
+use warnings;
use Test::More tests => 8;
use RT;
use RT::Test;
@@ -7,12 +9,12 @@
my $t1 = RT::Ticket->new($RT::SystemUser);
my ($trans);
-($id,$trans,$msg) =$t1->Create (Queue => 'general', Subject => 'Requestor test one', );
+my ($id,$trans,$msg) =$t1->Create (Queue => 'general', Subject => 'Requestor test one', );
ok ($id, $msg);
ok(ref($uri));
-ok (UNIVERSAL::isa($uri,RT::URI::fsck_com_rt), "It's an RT::URI::fsck_com_rt");
+ok (UNIVERSAL::isa($uri,"RT::URI::fsck_com_rt"), "It's an RT::URI::fsck_com_rt");
ok ($uri->isa('RT::URI::base'), "It's an RT::URI::base");
ok ($uri->isa('RT::Base'), "It's an RT::Base");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/uri-t.t Wed May 9 11:13:46 2007
@@ -1,10 +1,12 @@
+use strict;
+use warnings;
use Test::More tests => 6;
use RT;
use RT::Test;
my $t1 = RT::Ticket->new($RT::SystemUser);
my ($trans);
-($id,$trans,$msg) =$t1->Create (Queue => 'general', Subject => 'Requestor test one', );
+my ($id,$trans,$msg) =$t1->Create (Queue => 'general', Subject => 'Requestor test one', );
ok ($id, $msg);
use_ok("RT::URI::t");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/user.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/user.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/user.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -232,13 +234,13 @@
ok($qv, "Granted the right successfully - $qm");
# Add the user as a queue admincc
-ok ((my $add_id, $add_msg) = $q_as_system->AddWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Added the new user as a queue admincc");
+ok (my ($add_id, $add_msg) = $q_as_system->AddWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Added the new user as a queue admincc");
ok ($add_id, "the user is now a queue admincc - $add_msg");
# Make sure the user does have the right to modify tickets in the queue
ok ($new_user->HasRight( Object => $new_tick2, Right => 'ModifyTicket'), "User can modify the ticket as an admincc");
# Remove the user from the role group
-ok ((my $del_id, $del_msg) = $q_as_system->DeleteWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Deleted the new user as a queue admincc");
+ok (my ($del_id, $del_msg) = $q_as_system->DeleteWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Deleted the new user as a queue admincc");
# Make sure the user doesn't have the right to modify tickets in the queue
ok (!$new_user->HasRight( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without group membership");
@@ -248,14 +250,14 @@
# {{{ Test the user's right to modify a ticket as a _ticket_ admincc with the right granted at the _queue_ level
# Add the user as a ticket admincc
-ok ((my $uadd_id, $uadd_msg) = $new_tick2->AddWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Added the new user as a queue admincc");
+ok (my( $uadd_id, $uadd_msg) = $new_tick2->AddWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Added the new user as a queue admincc");
ok ($add_id, "the user is now a queue admincc - $add_msg");
# Make sure the user does have the right to modify tickets in the queue
ok ($new_user->HasRight( Object => $new_tick2, Right => 'ModifyTicket'), "User can modify the ticket as an admincc");
# Remove the user from the role group
-ok ((my $del_id, $del_msg) = $new_tick2->DeleteWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Deleted the new user as a queue admincc");
+ok (( $del_id, $del_msg) = $new_tick2->DeleteWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Deleted the new user as a queue admincc");
# Make sure the user doesn't have the right to modify tickets in the queue
ok (!$new_user->HasRight( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without group membership");
@@ -306,7 +308,7 @@
# Add the user as a ticket admincc
-ok ((my $uadd_id, $uadd_msg) = $new_tick2->AddWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Added the new user as a queue admincc");
+ok ( ($uadd_id, $uadd_msg) = $new_tick2->AddWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Added the new user as a queue admincc");
ok ($add_id, "the user is now a queue admincc - $add_msg");
# Make sure the user does have the right to modify tickets in the queue
@@ -314,7 +316,7 @@
ok (!$new_user->HasRight( Object => $new_tick2->QueueObj, Right => 'ModifyTicket'), "User can not modify tickets in the queue obj being only a ticket admincc");
# Remove the user from the role group
-ok ((my $del_id, $del_msg) = $new_tick2->DeleteWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Deleted the new user as a queue admincc");
+ok ( ($del_id, $del_msg) = $new_tick2->DeleteWatcher(Type => 'AdminCc', PrincipalId => $new_user->PrincipalId) , "Deleted the new user as a queue admincc");
# Make sure the user doesn't have the right to modify tickets in the queue
ok (!$new_user->HasRight( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without being an admincc");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/users.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/users.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/api/users.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
+use strict;
+use warnings;
use Test::More qw/no_plan/;
use RT;
use RT::Test;
@@ -25,7 +27,7 @@
# TODO: this wants more testing
my $RTxUser = RT::User->new($RT::SystemUser);
-($id, $msg) = $RTxUser->Create( Name => 'RTxUser', Comments => "RTx extension user", Privileged => 1);
+my ($id, $msg) = $RTxUser->Create( Name => 'RTxUser', Comments => "RTx extension user", Privileged => 1);
ok ($id,$msg);
my $group = RT::Group->new($RT::SystemUser);
@@ -37,7 +39,7 @@
*RTx::System::id = *RTx::System::Id;
my $ace = RT::Record->new($RT::SystemUser);
$ace->Table('ACL');
-$ace->_BuildTableAttributes unless ($_TABLE_ATTR->{ref($self)});
+$ace->_BuildTableAttributes unless ($RT::Record::_TABLE_ATTR->{ref($ace)});
($id, $msg) = $ace->Create( PrincipalId => $group->id, PrincipalType => 'Group', RightName => 'RTxUserRight', ObjectType => 'RTx::System', ObjectId => 1 );
ok ($id, "ACL for RTxSysObj created");
@@ -60,7 +62,7 @@
$ace = RT::Record->new($RT::SystemUser);
$ace->Table('ACL');
-$ace->_BuildTableAttributes unless ($_TABLE_ATTR->{ref($self)});
+$ace->_BuildTableAttributes unless ($RT::Record::_TABLE_ATTR->{ref($ace)});
($id, $msg) = $ace->Create( PrincipalId => $group->id, PrincipalType => 'Group', RightName => 'RTxUserRight', ObjectType => 'RTx::System::Record', ObjectId => 5 );
ok ($id, "ACL for RTxObj created");
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/cleanup_stalled.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/cleanup_stalled.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/cleanup_stalled.t Wed May 9 11:13:46 2007
@@ -1,4 +1,6 @@
#!/usr/bin/perl -w
+use strict;
+use warnings;
# Regression test suite for http://rt3.fsck.com/Ticket/Display.html?id=6184
# and related corner cases related to cleanup of delegated ACEs when
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/revocation.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/revocation.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/delegation/revocation.t Wed May 9 11:13:46 2007
@@ -1,5 +1,7 @@
#!/usr/bin/perl -w
+use strict;
+use warnings;
use Test::More qw(no_plan);
use RT;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/savedsearch.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/savedsearch.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/savedsearch.t Wed May 9 11:13:46 2007
@@ -1,3 +1,5 @@
+use strict;
+use warnings;
use RT;
use Test::More tests => 26;
use RT::User;
@@ -5,8 +7,8 @@
use RT::Ticket;
use RT::Queue;
-use_ok(RT::SavedSearch);
-use_ok(RT::SavedSearches);
+use_ok('RT::SavedSearch');
+use_ok('RT::SavedSearches');
use RT::Test;
# Set up some infrastructure. These calls are tested elsewhere.
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/shredder/00load.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/shredder/00load.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/shredder/00load.t Wed May 9 11:13:46 2007
@@ -1,3 +1,5 @@
+use strict;
+use warnings;
use Test::More tests => 11;
BEGIN { require "t/shredder/utils.pl" }
More information about the Rt-commit
mailing list