testPersistantCreatedAt

This commit is contained in:
fogelito
2022-08-01 17:00:57 +03:00
parent 6db2ce2a40
commit 3df0ba27fd
2 changed files with 5 additions and 4 deletions
Generated
+1 -1
View File
@@ -5394,5 +5394,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.2.0"
}
@@ -2540,16 +2540,17 @@ trait DatabasesBase
$document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, $headers, [
'data' => [
'title' => 'Again Updated Date Test',
'$createdAt' => 1657271810, // Try to update it, should not work
'$updatedAt' => 1657271810 // Try to update it, should not work
'$createdAt' => '2022-08-01 13:09:23.040', // $createdAt is not updatable
'$updatedAt' => '2022-08-01 13:09:23.050' // system will update it not api
]
]);
$this->assertEquals($document['body']['title'], 'Again Updated Date Test');
$this->assertEquals($document['body']['$createdAt'], $createdAt);
$this->assertNotEquals($document['body']['$createdAt'], '2022-08-01 13:09:23.040');
$this->assertNotEquals($document['body']['$updatedAt'], $updatedAt);
$this->assertNotEquals($document['body']['$updatedAt'], $updatedAtSecond);
$this->assertNotEquals($document['body']['$updatedAt'], 1657271810);
$this->assertNotEquals($document['body']['$updatedAt'], '2022-08-01 13:09:23.050');
return $data;
}