mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fixed webhooks tests - work in progress
This commit is contained in:
@@ -56,10 +56,10 @@ trait WebhooksBase
|
||||
$this->assertNotEmpty($webhook['data']['$id']);
|
||||
$this->assertEquals($webhook['data']['name'], 'Actors');
|
||||
$this->assertIsArray($webhook['data']['$permissions']);
|
||||
$this->assertIsArray($webhook['data']['$permissions']['read']);
|
||||
$this->assertIsArray($webhook['data']['$permissions']['write']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['read']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['write']);
|
||||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertCount(1, $webhook['data']['$read']);
|
||||
$this->assertCount(1, $webhook['data']['$write']);
|
||||
$this->assertCount(2, $webhook['data']['rules']);
|
||||
|
||||
return array_merge(['actorsId' => $actors['body']['$id']]);
|
||||
@@ -99,10 +99,10 @@ trait WebhooksBase
|
||||
$this->assertNotEmpty($webhook['data']['$id']);
|
||||
$this->assertEquals($webhook['data']['firstName'], 'Chris');
|
||||
$this->assertEquals($webhook['data']['lastName'], 'Evans');
|
||||
$this->assertIsArray($webhook['data']['$permissions']['read']);
|
||||
$this->assertIsArray($webhook['data']['$permissions']['write']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['read']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['write']);
|
||||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertCount(1, $webhook['data']['$read']);
|
||||
$this->assertCount(1, $webhook['data']['$write']);
|
||||
|
||||
$data['documentId'] = $document['body']['$id'];
|
||||
|
||||
@@ -142,10 +142,10 @@ trait WebhooksBase
|
||||
$this->assertNotEmpty($webhook['data']['$id']);
|
||||
$this->assertEquals($webhook['data']['firstName'], 'Chris1');
|
||||
$this->assertEquals($webhook['data']['lastName'], 'Evans2');
|
||||
$this->assertIsArray($webhook['data']['$permissions']['read']);
|
||||
$this->assertIsArray($webhook['data']['$permissions']['write']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['read']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['write']);
|
||||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertCount(1, $webhook['data']['$read']);
|
||||
$this->assertCount(1, $webhook['data']['$write']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
@@ -191,10 +191,10 @@ trait WebhooksBase
|
||||
$this->assertNotEmpty($webhook['data']['$id']);
|
||||
$this->assertEquals($webhook['data']['firstName'], 'Bradly');
|
||||
$this->assertEquals($webhook['data']['lastName'], 'Cooper');
|
||||
$this->assertIsArray($webhook['data']['$permissions']['read']);
|
||||
$this->assertIsArray($webhook['data']['$permissions']['write']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['read']);
|
||||
$this->assertCount(1, $webhook['data']['$permissions']['write']);
|
||||
$this->assertIsArray($webhook['data']['$read']);
|
||||
$this->assertIsArray($webhook['data']['$write']);
|
||||
$this->assertCount(1, $webhook['data']['$read']);
|
||||
$this->assertCount(1, $webhook['data']['$write']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user