[Rt-commit] r18227 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Feb 5 01:05:55 EST 2009
Author: sunnavy
Date: Thu Feb 5 01:05:55 2009
New Revision: 18227
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/t/ticket/deferred_owner.t
Log:
r19595 at sunnavys-mb: sunnavy | 2009-02-05 13:57:01 +0800
fixed tests in t/ticket/deferred_owner.t
Modified: rt/3.999/branches/merge_to_3.8.2/t/ticket/deferred_owner.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/ticket/deferred_owner.t (original)
+++ rt/3.999/branches/merge_to_3.8.2/t/ticket/deferred_owner.t Thu Feb 5 01:05:55 2009
@@ -25,7 +25,7 @@
{
RT::Test->set_rights(
{ principal => $tester->principal,
- right => [qw(Seequeue ShowTicket CreateTicket OwnTicket)],
+ right => [qw(SeeQueue ShowTicket CreateTicket OwnTicket)],
},
{ principal => $owner_role_group->principal,
object => $queue,
@@ -35,14 +35,11 @@
my $ticket = RT::Model::Ticket->new(current_user => $tester );
# tester is owner, owner has right to modify owned tickets,
# this right is required to set somebody as Admincc
- my ($tid, $txn_id, $msg);
- warning_like {
- ($tid, $txn_id, $msg) = $ticket->create(
- queue => $queue->id,
- owner => $tester->id,
- admin_cc => 'root at localhost',
- );
- } qr/User .* was proposed as a ticket owner but has no rights to own tickets in General/;
+ my ( $tid, $txn_id, $msg ) = $ticket->create(
+ queue => $queue->id,
+ owner => $tester->id,
+ admin_cc => 'root at localhost',
+ );
diag $msg if $msg && $ENV{'TEST_VERBOSE'};
@@ -101,16 +98,21 @@
{
RT::Test->set_rights(
{ principal => $tester->principal,
- right => [qw(Seequeue ShowTicket CreateTicket)],
+ right => [qw(SeeQueue ShowTicket CreateTicket)],
},
);
my $ticket = RT::Model::Ticket->new(current_user => $tester );
# set tester as cc, cc role group has right to own and take tickets
- my ($tid, $txn_id, $msg) = $ticket->create(
- queue => $queue->id,
- owner => $tester->id,
- cc => 'tester at localhost',
- );
+
+ my ( $tid, $txn_id, $msg );
+ warning_like {
+ ( $tid, $txn_id, $msg ) = $ticket->create(
+ queue => $queue->id,
+ owner => $tester->id,
+ cc => 'tester at localhost',
+ );
+ }
+qr/User .* was proposed as a ticket owner but has no rights to own tickets in General/;
diag $msg if $msg && $ENV{'TEST_VERBOSE'};
ok $tid, "created a ticket";
like $ticket->role_group("cc")->member_emails_as_string, qr/tester\@localhost/, 'tester is in the cc list';
More information about the Rt-commit
mailing list