[Rt-commit] rt branch, 4.4/disabled-user-in-single-custom-role, updated. rt-4.4.2-227-g057386d12
? sunnavy
sunnavy at bestpractical.com
Wed Apr 25 13:05:08 EDT 2018
The branch, 4.4/disabled-user-in-single-custom-role has been updated
via 057386d12e423a404f6a2ba5ff8ddc8a8e0f001d (commit)
from 72fcc41ed3580106c7f06bd7b4eb3ae659c5122a (commit)
Summary of changes:
t/customroles/tickets.t | 10 ++++++++++
1 file changed, 10 insertions(+)
- Log -----------------------------------------------------------------
commit 057386d12e423a404f6a2ba5ff8ddc8a8e0f001d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Apr 26 01:03:40 2018 +0800
Test AddWatcher with disabled user in single member custom role
diff --git a/t/customroles/tickets.t b/t/customroles/tickets.t
index 91da7624b..f4e3d5a43 100644
--- a/t/customroles/tickets.t
+++ b/t/customroles/tickets.t
@@ -297,6 +297,15 @@ diag 'update ticket in Specs' if $ENV{'TEST_VERBOSE'};
($ok, $msg) = $t->AddWatcher(Type => $engineer->GroupType, Principal => $blake->PrincipalObj);
ok($ok, "add engineer: $msg");
is($t->RoleAddresses($engineer->GroupType), $blake->EmailAddress, 'engineer blake (single-member role so linus gets displaced)');
+ ($ok, $msg) = $blake->SetDisabled(1);
+ ok($ok, 'temporarily disable user blake');
+
+ ($ok, $msg) = $t->AddWatcher(Type => $engineer->GroupType, Principal => $moss->PrincipalObj);
+ ok($ok, "add engineer: $msg");
+ like($msg, qr/changed from blake\@example\.com to moss\@example\.com/, 'message of AddWatcher');
+ is($t->RoleAddresses($engineer->GroupType), $moss->EmailAddress, 'engineer moss (single-member role so black gets displaced)');
+ ($ok, $msg) = $blake->SetDisabled(0);
+ ok($ok, 're-enable user blake');
($ok, $msg) = $t->AddWatcher(Type => $engineer->GroupType, Principal => RT->Nobody->PrincipalObj);
ok($ok, "add engineer: $msg");
@@ -319,6 +328,7 @@ diag 'update ticket in Specs' if $ENV{'TEST_VERBOSE'};
qr/Sales-$$ ricky\.roma\@example\.com deleted/,
qr/Engineer-$$ set to linus\@example\.com/,
qr/Engineer-$$ set to blake\@example\.com/,
+ qr/Engineer-$$ set to moss\@example\.com/,
qr/Engineer-$$ set to Nobody in particular/,
]);
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list