mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
updated tests and reduce the timeouts
This commit is contained in:
@@ -63,11 +63,31 @@ trait PresenceBase
|
||||
|
||||
$this->assertEquals($payload['userId'], $response['body']['userId']);
|
||||
|
||||
$canonicalPresence = $this->client->call(
|
||||
Client::METHOD_GET,
|
||||
'/presences',
|
||||
[
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
'x-appwrite-key' => $this->getPresenceApiKey(),
|
||||
],
|
||||
[
|
||||
'queries' => [
|
||||
Query::equal('userId', [$payload['userId']])->toString(),
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->assertEquals(200, $canonicalPresence['headers']['status-code']);
|
||||
$this->assertGreaterThanOrEqual(1, $canonicalPresence['body']['total'] ?? 0);
|
||||
$this->assertNotEmpty($canonicalPresence['body']['presences'][0] ?? []);
|
||||
|
||||
$presence = $canonicalPresence['body']['presences'][0];
|
||||
|
||||
if (empty($overrides)) {
|
||||
self::$presenceCache[$cacheKey] = $response['body'];
|
||||
self::$presenceCache[$cacheKey] = $presence;
|
||||
}
|
||||
|
||||
return $response['body'];
|
||||
return $presence;
|
||||
}
|
||||
|
||||
public function testUpsertAndGetPresence(): void
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user