mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix tests
This commit is contained in:
@@ -3283,7 +3283,9 @@ trait DatabasesBase
|
||||
// Filter to setup documents only, since other tests may have created additional docs in this collection.
|
||||
$baseQueries = [
|
||||
Query::equal('$id', $docIds)->toString(),
|
||||
Query::select(['title', 'releaseYear', '$id'])->toString(),
|
||||
Query::select('title')->toString(),
|
||||
Query::select('releaseYear')->toString(),
|
||||
Query::select('$id')->toString(),
|
||||
Query::orderAsc('releaseYear')->toString(),
|
||||
];
|
||||
|
||||
@@ -3352,7 +3354,7 @@ trait DatabasesBase
|
||||
], $this->getHeaders()), [
|
||||
'queries' => [
|
||||
Query::equal('$id', $docIds)->toString(),
|
||||
Query::select(['title'])->toString(),
|
||||
Query::select('title')->toString(),
|
||||
Query::orderAsc('releaseYear')->toString(),
|
||||
],
|
||||
'ttl' => 10,
|
||||
@@ -3374,7 +3376,9 @@ trait DatabasesBase
|
||||
], $this->getHeaders()), [
|
||||
'queries' => [
|
||||
Query::equal('$id', $docIds)->toString(),
|
||||
Query::select(['title', 'releaseYear', '$id'])->toString(),
|
||||
Query::select('title')->toString(),
|
||||
Query::select('releaseYear')->toString(),
|
||||
Query::select('$id')->toString(),
|
||||
Query::orderAsc('releaseYear')->toString(),
|
||||
],
|
||||
]);
|
||||
@@ -3413,7 +3417,8 @@ trait DatabasesBase
|
||||
// Use different select queries from testListDocumentsWithCache to avoid cache key collision.
|
||||
$queries = [
|
||||
Query::equal('$id', $docIds)->toString(),
|
||||
Query::select(['title', '$id'])->toString(),
|
||||
Query::select('title')->toString(),
|
||||
Query::select('$id')->toString(),
|
||||
Query::orderAsc('$createdAt')->toString(),
|
||||
];
|
||||
|
||||
@@ -3532,13 +3537,11 @@ trait DatabasesBase
|
||||
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
|
||||
/**
|
||||
* todo:shmuel move this tests please
|
||||
*/
|
||||
/**
|
||||
* Use specific X-Appwrite-Response-Format 1.8.0
|
||||
*/
|
||||
$response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents', array_merge([
|
||||
$response = $this->client->call(Client::METHOD_GET, $this->getRecordUrl($databaseId, $document[$this->getContainerIdResponseKey()], $document['$id']), array_merge([
|
||||
//$response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'X-Appwrite-Response-Format' => '1.8.0',
|
||||
|
||||
@@ -397,9 +397,6 @@ class ProjectsConsoleClientTest extends Scope
|
||||
|
||||
$this->assertEquals(400, $response['headers']['status-code']);
|
||||
|
||||
/**
|
||||
* todo: shmuel move this
|
||||
*/
|
||||
/**
|
||||
* Test old version select queries are failing
|
||||
*/
|
||||
@@ -428,7 +425,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $list['headers']['status-code']);
|
||||
$this->assertEquals(5, $list['body']['total']);
|
||||
$this->assertEquals(6, $list['body']['total']);
|
||||
$project = $list['body']['projects'][0];
|
||||
$this->assertEquals('Project Test', $project['name']);
|
||||
$this->assertArrayHasKey('$id', $project);
|
||||
|
||||
Reference in New Issue
Block a user