mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix webhook tests
This commit is contained in:
@@ -90,7 +90,7 @@ trait DatabaseBase
|
||||
$this->assertEquals($actors['body']['array'], true);
|
||||
|
||||
// wait for database worker to create attributes
|
||||
sleep(5);
|
||||
sleep(10);
|
||||
|
||||
$movies = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'], array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -101,6 +101,8 @@ trait DatabaseBase
|
||||
$this->assertEquals($movies['body']['$id'], $title['body']['$collection']);
|
||||
$this->assertEquals($movies['body']['$id'], $releaseYear['body']['$collection']);
|
||||
$this->assertEquals($movies['body']['$id'], $actors['body']['$collection']);
|
||||
$this->assertIsArray($movies['body']['attributesInQueue']);
|
||||
$this->assertCount(0, $movies['body']['attributesInQueue']);
|
||||
$this->assertIsArray($movies['body']['attributes']);
|
||||
$this->assertCount(3, $movies['body']['attributes']);
|
||||
$this->assertEquals($movies['body']['attributes'][0]['$id'], $title['body']['$id']);
|
||||
|
||||
@@ -91,7 +91,6 @@ trait WebhooksBase
|
||||
$this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], 'not-yet-implemented');
|
||||
$this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']);
|
||||
$this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']);
|
||||
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
||||
$this->assertNotEmpty($webhook['data']['$id']);
|
||||
$this->assertEquals($webhook['data']['$id'], 'lastName');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user