[Rt-commit] r18073 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 29 23:20:52 EST 2009
Author: sunnavy
Date: Thu Jan 29 23:20:51 2009
New Revision: 18073
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/t/ticket/add-watchers.t
Log:
r19332 at sunnavys-mb: sunnavy | 2009-01-30 09:39:11 +0800
merged t/ticket/add-watchers.t
Modified: rt/3.999/branches/merge_to_3.8.2/t/ticket/add-watchers.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/ticket/add-watchers.t (original)
+++ rt/3.999/branches/merge_to_3.8.2/t/ticket/add-watchers.t Thu Jan 29 23:20:51 2009
@@ -45,7 +45,7 @@
#
# END BPS TAGGED BLOCK }}}
-use Test::More tests => 28;
+use Test::More tests => 32;
use RT::Test;
use strict;
@@ -124,6 +124,18 @@
($rv, $msg) = $ticket2->add_watcher( type => 'requestor', email => $user->email );
ok( $rv, "user can add self as Requestor by Email" );
+# remove user and try adding by username
+# This worked in 3.6 and is a regression in 3.8
+($rv, $msg) = $ticket->delete_watcher( type => 'cc', email => $user->email );
+ok( $rv, "watcher removed by email" );
+($rv, $msg) = $ticket->delete_watcher( type => 'requestor', email => $user->email );
+ok( $rv, "watcher removed by email" );
+
+($rv, $msg) = $ticket2->add_watcher( type => 'cc', email => $user->name );
+ok( $rv, "user can add self as Cc by username" );
+($rv, $msg) = $ticket2->add_watcher( type => 'requestor', email => $user->name );
+ok( $rv, "user can add self as Requestor by username" );
+
# Queue watcher tests
$principal->revoke_right( right => 'Watch' , object => $queue );
ok( !$user->has_right( right => 'Watch', object => $queue ), "user queue watch right revoked" );
@@ -155,4 +167,3 @@
($rv, $msg) = $queue2->add_watcher( type => 'requestor', email => $user->email );
ok( $rv, "user can add self as Requestor by Email" );
-
More information about the Rt-commit
mailing list