Added more tests
This commit is contained in:
parent
c51c73b53a
commit
1131fb57dc
1 changed files with 19 additions and 2 deletions
|
@ -54,6 +54,24 @@ class ProjectUsersTest extends BaseProjects
|
||||||
$this->assertGreaterThan(0, $user['body']['registration']);
|
$this->assertGreaterThan(0, $user['body']['registration']);
|
||||||
$this->assertIsArray($user['body']['roles']);
|
$this->assertIsArray($user['body']['roles']);
|
||||||
|
|
||||||
|
$sessions = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/sessions', [
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $data['projectUid'],
|
||||||
|
'x-appwrite-key' => $data['projectAPIKeySecret'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($sessions['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($sessions['body']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/logs', [
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $data['projectUid'],
|
||||||
|
'x-appwrite-key' => $data['projectAPIKeySecret'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +97,6 @@ class ProjectUsersTest extends BaseProjects
|
||||||
'x-appwrite-key' => $data['projectAPIKeySecret'],
|
'x-appwrite-key' => $data['projectAPIKeySecret'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var_dump($user);
|
|
||||||
$this->assertEquals($user['headers']['status-code'], 200);
|
$this->assertEquals($user['headers']['status-code'], 200);
|
||||||
$this->assertEquals($user['body']['status'], 2);
|
$this->assertEquals($user['body']['status'], 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue