1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

fix: tests

This commit is contained in:
loks0n 2024-02-20 12:41:49 +00:00
parent f0a981226e
commit b76771a8b4
4 changed files with 4 additions and 8 deletions

View file

@ -146,9 +146,9 @@ class AccountCustomServerTest extends Scope
$response = $this->client->call(Client::METHOD_GET, '/account', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
]));
$this->assertEquals(404, $response['headers']['status-code']);
$this->assertEquals(401, $response['headers']['status-code']);
return $data;
}
@ -278,8 +278,7 @@ class AccountCustomServerTest extends Scope
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-session' => $session
],
$this->getHeaders()
]
));
$this->assertEquals($response['headers']['status-code'], 200);

View file

@ -111,8 +111,7 @@ class DatabasesConsoleClientTest extends Scope
$collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
'x-appwrite-project' => $this->getProject()['$id']
], $this->getHeaders()));
$this->assertEquals(200, $collections['headers']['status-code']);

View file

@ -114,7 +114,6 @@ class DatabasesCustomClientTest extends Scope
$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()));
$this->assertEquals(200, $response['headers']['status-code']);

View file

@ -2494,7 +2494,6 @@ class ProjectsConsoleClientTest extends Scope
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/keys/' . $keyId, array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $keyId
], $this->getHeaders()), []);
$this->assertEquals(200, $response['headers']['status-code']);