You are here

public function RoleDelegationRoleEditingTestCase::testDeleteRole in Role Delegation 7

Delete a role, then create a new one with the same name. Check that no users have permission to assign the new role.

File

./role_delegation.test, line 352
Tests for the Role Delegation module.

Class

RoleDelegationRoleEditingTestCase
Functional tests for editing roles.

Code

public function testDeleteRole() {
  $this
    ->drupalPost("admin/people/permissions/roles/delete/{$this->rid_low}", NULL, t('Delete'));
  $this
    ->drupalPost('admin/people/permissions/roles', array(
    'name' => 'low',
  ), t('Add role'));
  $this
    ->drupalGet('admin/people/permissions');
  $this
    ->assertNoFieldChecked("edit-{$this->rid_high}-assign-low-role", t('Permissions are updated when role is deleted.'), t('Role Delegation'));
}