public function RoleDelegationRoleEditingTestCase::testRenameRole in Role Delegation 7
Rename a role, and check that users that had permission to assign the old role now have permission to assign the new one.
File
- ./
role_delegation.test, line 338 - Tests for the Role Delegation module.
Class
- RoleDelegationRoleEditingTestCase
- Functional tests for editing roles.
Code
public function testRenameRole() {
$this
->drupalPost("admin/people/permissions/roles/edit/{$this->rid_low}", array(
'name' => 'new low',
), t('Save role'));
$this
->drupalGet('admin/people/permissions');
$this
->assertFieldChecked("edit-{$this->rid_high}-assign-new-low-role", t('Permissions are updated when role is renamed.'), t('Role Delegation'));
}