[Rt-commit] r7713 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Fri Apr 27 19:57:47 EDT 2007


Author: ruz
Date: Fri Apr 27 19:57:46 2007
New Revision: 7713

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07-rights_web.t

Log:
 r5167 at cubic-pc:  cubic | 2007-04-28 03:57:31 +0400
 * return back rights we revoke in the beginning, so we left system in the same state


Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07-rights_web.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07-rights_web.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07-rights_web.t	Fri Apr 27 19:57:46 2007
@@ -1,7 +1,8 @@
 #!/usr/bin/perl -w
 use strict;
+use warnings;
 
-use Test::More tests => 13;
+use Test::More tests => 15;
 BEGIN {
     use RT;
     RT::LoadConfig;
@@ -74,3 +75,20 @@
     is_deeply( [get_rights( $m, $everyone_gid, 'RT::System-1' )], [], 'revoked SuperUser right' );
 }
 
+
+diag "return rights the group had in the beginning" if $ENV{'TEST_VERBOSE'};
+if ( @has ) {
+    $m->form_number(3);
+    $m->select("GrantRight-$everyone_gid-RT::System-1", \@has);
+    $m->submit;
+
+    $m->content_contains('Right Granted', 'got message');
+    is_deeply(
+        [ get_rights( $m, $everyone_gid, 'RT::System-1' ) ],
+        [ @has ],
+        'returned back all rights'
+    );
+} else {
+    ok(1, 'the group had no global rights, so nothing to return');
+}
+


More information about the Rt-commit mailing list