1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

use getUser to fetch userId in test

This commit is contained in:
prateek banga 2023-08-08 21:20:19 +05:30
parent 385f76d7f2
commit ebcb43bbad

View file

@ -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'],