From ebcb43bbadacfe27754fb169fe90b483c3f6c586 Mon Sep 17 00:00:00 2001 From: prateek banga Date: Tue, 8 Aug 2023 21:20:19 +0530 Subject: [PATCH] use getUser to fetch userId in test --- .../e2e/Services/Databases/DatabasesCustomClientTest.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index f50dada5b8..0b86dba9cb 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -320,13 +320,7 @@ class DatabasesCustomClientTest extends Scope public function testUpdateWithoutRelationPermission(): void { - $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], $this->getHeaders())); - - $userId = $response['body']['$id']; + $userId = $this->getUser()['$id']; $database = $this->client->call(Client::METHOD_POST, '/databases', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'],