mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR unit test for getting members by permission via roles (from r88276) (from r98084)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102577 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5ba037cc04
commit
39615a4a09
@ -50,4 +50,14 @@ class PermissionTest extends SapphireTest {
|
||||
// Check that a random permission that shouldn't be there isn't
|
||||
$this->assertFalse(Permission::checkMember($member, "CMS_ACCESS_SecurityAdmin"));
|
||||
}
|
||||
/**
|
||||
* Ensure the the get_*_by_permission functions are permission role aware
|
||||
*/
|
||||
function testGettingMembersByPermission() {
|
||||
$accessMember = $this->objFromFixture('Member', 'access');
|
||||
|
||||
$result = Permission::get_members_by_permission(array('CMS_ACCESS_SecurityAdmin'));
|
||||
|
||||
$this->assertContains($result, $accessMember, 'Member is found via a permission attached to a role');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user