fix tests for database
This commit is contained in:
parent
d8dc30b08a
commit
6aa5bb42b6
|
@ -16,6 +16,7 @@ trait DatabaseBase
|
|||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
]), [
|
||||
'collectionId' => 'unique()',
|
||||
'name' => 'Movies',
|
||||
'read' => ['role:all'],
|
||||
'write' => ['role:all'],
|
||||
|
@ -160,6 +161,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'title' => 'Captain America',
|
||||
'releaseYear' => 1944,
|
||||
|
@ -176,6 +178,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'title' => 'Spider-Man: Far From Home',
|
||||
'releaseYear' => 2019,
|
||||
|
@ -193,6 +196,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'title' => 'Spider-Man: Homecoming',
|
||||
'releaseYear' => 2017,
|
||||
|
@ -209,6 +213,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'releaseYear' => 2020, // Missing title, expect an 400 error
|
||||
],
|
||||
|
@ -421,6 +426,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'title' => 'Thor: Ragnaroc',
|
||||
'releaseYear' => 2017,
|
||||
|
@ -476,6 +482,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'title' => 'Thor: Ragnarok',
|
||||
'releaseYear' => 2017,
|
||||
|
@ -523,6 +530,7 @@ trait DatabaseBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'title' => 'Captain America',
|
||||
'releaseYear' => 1944,
|
||||
|
|
|
@ -25,6 +25,7 @@ class DatabaseCustomServerTest extends Scope
|
|||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
]), [
|
||||
'collectionId' => 'unique()',
|
||||
'name' => 'Actors',
|
||||
'read' => ['role:all'],
|
||||
'write' => ['role:all'],
|
||||
|
@ -76,6 +77,7 @@ class DatabaseCustomServerTest extends Scope
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'firstName' => 'Tom',
|
||||
'lastName' => 'Holland',
|
||||
|
@ -88,6 +90,7 @@ class DatabaseCustomServerTest extends Scope
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'documentId' => 'unique()',
|
||||
'data' => [
|
||||
'firstName' => 'Samuel',
|
||||
'lastName' => 'Jackson',
|
||||
|
|
Loading…
Reference in a new issue