[Rt-commit] r18074 - in rt/3.999/branches/merge_to_3.8.2: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 23:21:07 EST 2009


Author: sunnavy
Date: Thu Jan 29 23:21:05 2009
New Revision: 18074

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:
 r19333 at sunnavys-mb:  sunnavy | 2009-01-30 09:40:23 +0800
 merged 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 Jan 29 23:21:05 2009
@@ -1,4 +1,4 @@
-use Test::More  tests => '17';
+use Test::More tests => 18;
 
 use strict;
 use warnings;
@@ -6,6 +6,7 @@
 use_ok('RT');
 use_ok('RT::Model::Ticket');
 use RT::Test;
+use Test::Warn;
 
 
 my $tester = RT::Test->load_or_create_user(
@@ -34,11 +35,16 @@
     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) = $ticket->create(
-        queue   => $queue->id,
-        owner   => $tester->id,
-        admin_cc => 'root 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";
     is $ticket->owner->id, $tester->id, 'correct owner';


More information about the Rt-commit mailing list