public function UuidUserServicesTest::testUserDeletePermFail in Universally Unique IDentifier 7
Tests user Delete fail with no permissions.
File
- uuid_services/
uuid_services.user_services.test, line 224 - Test the UUID User Services integration.
Class
- UuidUserServicesTest
- Test the UUID User Services integration.
Code
public function testUserDeletePermFail() {
$user = $this
->drupalCreateUser();
$this
->drupalLogin($user);
$other_user = $this
->drupalCreateUser();
$response = $this
->servicesDelete($this->endpoint->path . '/user/' . $other_user->uuid);
$user_after_update = user_load($other_user->uid, TRUE);
$this
->assertTrue(!empty($user_after_update), 'User was not deleted without the needed permissions');
$this
->assertTrue($response['code'] == 403, 'Deleting the user failed without the needed permissions');
}