mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: correct expected default values and attribute name in tests
- Update expected default values to match the actual defaults (update tests are skipped, so original defaults apply) - Fix varchar_max -> varchar_min (varchar_max was never created) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
2e061e2f2b
commit
45a3793cc0
@@ -622,9 +622,9 @@ class DatabasesStringTypesTest extends Scope
|
||||
]);
|
||||
|
||||
$this->assertEquals(201, $document['headers']['status-code']);
|
||||
// Check that default values are applied
|
||||
$this->assertEquals('updated default', $document['body']['varchar_with_default']);
|
||||
$this->assertEquals('Updated text default value', $document['body']['text_with_default']);
|
||||
// Check that default values are applied (original defaults, update tests are skipped)
|
||||
$this->assertEquals('hello world', $document['body']['varchar_with_default']);
|
||||
$this->assertEquals('This is a longer default text value that can contain more content.', $document['body']['text_with_default']);
|
||||
}
|
||||
|
||||
public function testCreateDocumentFailures(): void
|
||||
@@ -740,7 +740,7 @@ class DatabasesStringTypesTest extends Scope
|
||||
$collectionId = self::$collectionId;
|
||||
|
||||
// Test SUCCESS: Delete varchar attribute
|
||||
$deleteVarchar = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/varchar_max', [
|
||||
$deleteVarchar = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/varchar_min', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
@@ -749,7 +749,7 @@ class DatabasesStringTypesTest extends Scope
|
||||
$this->assertEquals(204, $deleteVarchar['headers']['status-code']);
|
||||
|
||||
// Verify deletion
|
||||
$getDeleted = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/varchar_max', [
|
||||
$getDeleted = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/varchar_min', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
|
||||
@@ -622,9 +622,9 @@ class DatabasesStringTypesTest extends Scope
|
||||
]);
|
||||
|
||||
$this->assertEquals(201, $row['headers']['status-code']);
|
||||
// Check that default values are applied
|
||||
$this->assertEquals('updated default', $row['body']['varchar_with_default']);
|
||||
$this->assertEquals('Updated text default value', $row['body']['text_with_default']);
|
||||
// Check that default values are applied (original defaults, update tests are skipped)
|
||||
$this->assertEquals('hello world', $row['body']['varchar_with_default']);
|
||||
$this->assertEquals('This is a longer default text value that can contain more content.', $row['body']['text_with_default']);
|
||||
}
|
||||
|
||||
public function testCreateRowFailures(): void
|
||||
@@ -805,7 +805,7 @@ class DatabasesStringTypesTest extends Scope
|
||||
$tableId = self::$tableId;
|
||||
|
||||
// Test SUCCESS: Delete varchar column
|
||||
$deleteVarchar = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/varchar_max', [
|
||||
$deleteVarchar = $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/varchar_min', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
@@ -814,7 +814,7 @@ class DatabasesStringTypesTest extends Scope
|
||||
$this->assertEquals(204, $deleteVarchar['headers']['status-code']);
|
||||
|
||||
// Verify deletion
|
||||
$getDeleted = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/varchar_max', [
|
||||
$getDeleted = $this->client->call(Client::METHOD_GET, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/varchar_min', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
|
||||
Reference in New Issue
Block a user