tests: fix attribute and index test

This commit is contained in:
Torsten Dittmann
2021-12-16 17:10:01 +01:00
parent 86075a50ab
commit 548f3a3adb
4 changed files with 9 additions and 9 deletions
@@ -61,7 +61,7 @@ class RealtimeConsoleClientTest extends Scope
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'attributeId' => 'name',
'key' => 'name',
'size' => 256,
'required' => true,
]);
@@ -134,7 +134,7 @@ class RealtimeConsoleClientTest extends Scope
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'indexId' => 'key_name',
'key' => 'key_name',
'type' => 'key',
'attributes' => [
'name',
@@ -586,7 +586,7 @@ class RealtimeCustomClientTest extends Scope
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'attributeId' => 'name',
'key' => 'name',
'size' => 256,
'required' => true,
]);
+3 -3
View File
@@ -57,7 +57,7 @@ trait WebhooksBase
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'attributeId' => 'firstName',
'key' => 'firstName',
'size' => 256,
'required' => true,
]);
@@ -67,7 +67,7 @@ trait WebhooksBase
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'attributeId' => 'lastName',
'key' => 'lastName',
'size' => 256,
'required' => true,
]);
@@ -77,7 +77,7 @@ trait WebhooksBase
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'attributeId' => 'extra',
'key' => 'extra',
'size' => 64,
'required' => false,
]);
@@ -64,7 +64,7 @@ class WebhooksCustomServerTest extends Scope
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'indexId' => 'fullname',
'key' => 'fullname',
'type' => 'key',
'attributes' => ['lastName', 'firstName'],
'orders' => ['ASC', 'ASC'],
@@ -125,7 +125,7 @@ class WebhooksCustomServerTest extends Scope
'write' => ['role:all'],
'permission' => 'document'
]);
$this->assertEquals($actors['headers']['status-code'], 201);
$this->assertNotEmpty($actors['body']['$id']);
@@ -134,7 +134,7 @@ class WebhooksCustomServerTest extends Scope
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), []);
$this->assertEquals($actors['headers']['status-code'], 204);
$webhook = $this->getLastRequest();