1
0
Fork 0
mirror of synced 2024-06-17 10:14:50 +12:00

Added tests for Database webhooks

This commit is contained in:
Eldad Fux 2020-12-01 20:53:31 +02:00
parent f5df201e4a
commit 4df6cb2ef5
2 changed files with 3 additions and 4 deletions

View file

@ -18,6 +18,7 @@ class Session extends Model
->addRule('userId', [
'type' => self::TYPE_STRING,
'description' => 'User ID.',
'default' => '',
'example' => '5e5bb8c16897e',
])
->addRule('expire', [

View file

@ -18,8 +18,6 @@ class WebhooksCustomServerTest extends Scope
*/
public function testUpdateCollection($data): array
{
var_dump($data);
exit();
/**
* Test for SUCCESS
*/
@ -110,7 +108,7 @@ class WebhooksCustomServerTest extends Scope
$this->assertEquals($actors['headers']['status-code'], 201);
$this->assertNotEmpty($actors['body']['$id']);
$actors = $this->client->call(Client::METHOD_DELETE, '/database/collections', array_merge([
$actors = $this->client->call(Client::METHOD_DELETE, '/database/collections/'.$actors['body']['$id'], array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
@ -135,7 +133,7 @@ class WebhooksCustomServerTest extends Scope
$this->assertCount(1, $webhook['data']['$permissions']['write']);
$this->assertCount(2, $webhook['data']['rules']);
return array_merge(['actorsId' => $actors['body']['$id']]);
return [];
}
public function testCreateUser():array