mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
Add tests
This commit is contained in:
@@ -488,4 +488,18 @@ class UserRightsTest extends ItopDataTestCase
|
||||
'with Admins hidden' => [true, 0],
|
||||
];
|
||||
}
|
||||
|
||||
public function testGetOwnerOrganizationAttCode()
|
||||
{
|
||||
$this->assertEquals('id', UserRights::GetOwnerOrganizationAttCode('Organization'));
|
||||
|
||||
$this->assertEquals('org_id', UserRights::GetOwnerOrganizationAttCode('Server'));
|
||||
$this->assertEquals('org_id', UserRights::GetOwnerOrganizationAttCode('UserRequest'));
|
||||
|
||||
$this->assertEquals('item_org_id', UserRights::GetOwnerOrganizationAttCode('InlineImage'));
|
||||
$this->assertEquals('item_org_id', UserRights::GetOwnerOrganizationAttCode('Attachment'));
|
||||
|
||||
$this->assertNull(UserRights::GetOwnerOrganizationAttCode('TriggerOnObjectCreation'));
|
||||
$this->assertNull(UserRights::GetOwnerOrganizationAttCode('lnkPersonToTeam'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user