mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #10264 from appwrite/fix-dec-min-0
Fix atomic number ops with limit 0
This commit is contained in:
Generated
+6
-6
@@ -3542,16 +3542,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "0.71.10",
|
||||
"version": "0.71.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "83278d663f9c63c25a11d9e71c7922da7ec48636"
|
||||
"reference": "644ed827aace63cbdf8c6c64a3998c11b43e3383"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636",
|
||||
"reference": "83278d663f9c63c25a11d9e71c7922da7ec48636",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/644ed827aace63cbdf8c6c64a3998c11b43e3383",
|
||||
"reference": "644ed827aace63cbdf8c6c64a3998c11b43e3383",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3592,9 +3592,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/0.71.10"
|
||||
"source": "https://github.com/utopia-php/database/tree/0.71.11"
|
||||
},
|
||||
"time": "2025-07-18T00:05:55+00:00"
|
||||
"time": "2025-08-05T08:35:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/detector",
|
||||
|
||||
@@ -5664,7 +5664,27 @@ trait DatabasesBase
|
||||
]), ['min' => 7]);
|
||||
$this->assertEquals(400, $err['headers']['status-code']);
|
||||
|
||||
// Test type error on non-numeric attribut
|
||||
// Test min limit exceeded with custom value
|
||||
$err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
]), [
|
||||
'value' => 3,
|
||||
'min' => 5,
|
||||
]);
|
||||
$this->assertEquals(400, $err['headers']['status-code']);
|
||||
|
||||
// Test min limit 0
|
||||
$err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
]), [
|
||||
'value' => 10,
|
||||
'min' => 0,
|
||||
]);
|
||||
$this->assertEquals(400, $err['headers']['status-code']);
|
||||
|
||||
// Test type error on non-numeric attribute
|
||||
$typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
|
||||
Reference in New Issue
Block a user