[Rt-commit] rt branch, rightsmatrix, updated. rt-3.8.8-674-gf4bb682

Thomas Sibley trs at bestpractical.com
Fri Sep 3 11:02:40 EDT 2010


The branch, rightsmatrix has been updated
       via  f4bb682254078968216d63ee1766f3b2fb65781e (commit)
      from  25f5dc159c508d4e089b96196a2ac4fab461349f (commit)

Summary of changes:
 t/web/rights.t |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit f4bb682254078968216d63ee1766f3b2fb65781e
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Sep 3 11:04:51 2010 -0400

    Fix our minimal rights editor testing for the new UI

diff --git a/t/web/rights.t b/t/web/rights.t
index 7b93a7e..3fa3829 100644
--- a/t/web/rights.t
+++ b/t/web/rights.t
@@ -17,8 +17,8 @@ sub get_rights {
     my $principal_id = shift;
     my $object = shift;
     $agent->form_number(3);
-    my @inputs = $agent->current_form->find_input("RevokeRight-$principal_id-$object");
-    my @rights = sort grep $_, map $_->possible_values, grep $_, @inputs;
+    my @inputs = $agent->current_form->find_input("SetRights-$principal_id-$object");
+    my @rights = sort grep $_, map $_->possible_values, grep $_ && $_->value, @inputs;
     return @rights;
 };
 
@@ -34,7 +34,7 @@ diag "revoke all global rights from Everyone group";
 my @has = get_rights( $m, $everyone_gid, 'RT::System-1' );
 if ( @has ) {
     $m->form_number(3);
-    $m->tick("RevokeRight-$everyone_gid-RT::System-1", $_) foreach @has;
+    $m->untick("SetRights-$everyone_gid-RT::System-1", $_) foreach @has;
     $m->submit;
     
     is_deeply([get_rights( $m, $everyone_gid, 'RT::System-1' )], [], 'deleted all rights' );
@@ -45,7 +45,7 @@ if ( @has ) {
 diag "grant SuperUser right to everyone";
 {
     $m->form_number(3);
-    $m->select("GrantRight-$everyone_gid-RT::System-1", ['SuperUser']);
+    $m->tick("SetRights-$everyone_gid-RT::System-1", 'SuperUser');
     $m->submit;
 
     $m->content_contains('Right Granted', 'got message');
@@ -57,7 +57,7 @@ diag "grant SuperUser right to everyone";
 diag "revoke the right";
 {
     $m->form_number(3);
-    $m->tick("RevokeRight-$everyone_gid-RT::System-1", 'SuperUser');
+    $m->untick("SetRights-$everyone_gid-RT::System-1", 'SuperUser');
     $m->submit;
 
     $m->content_contains('Right revoked', 'got message');
@@ -70,7 +70,7 @@ diag "revoke the right";
 diag "return rights the group had in the beginning";
 if ( @has ) {
     $m->form_number(3);
-    $m->select("GrantRight-$everyone_gid-RT::System-1", \@has);
+    $m->tick("SetRights-$everyone_gid-RT::System-1", $_) for @has;
     $m->submit;
 
     $m->content_contains('Right Granted', 'got message');

-----------------------------------------------------------------------


More information about the Rt-commit mailing list