Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tests/e2e/Adapter/Scopes/DocumentTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -3533,6 +3533,17 @@ public function testUpdateDocuments(): void
'array' => false,
'filters' => [],
]),
new Document([
'$id' => ID::custom('boolean'),
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => false, // not null
'array' => false,
'filters' => [],
]),
], permissions: [
Permission::read(Role::any()),
Permission::create(Role::any()),
Expand All @@ -3544,7 +3555,8 @@ public function testUpdateDocuments(): void
$database->createDocument($collection, new Document([
'$id' => 'doc' . $i,
'string' => 'text📝 ' . $i,
'integer' => $i
'integer' => $i,
'boolean' => true
]));
}

Expand All @@ -3562,6 +3574,7 @@ public function testUpdateDocuments(): void

foreach ($results as $document) {
$this->assertEquals('text📝 updated', $document->getAttribute('string'));
$this->assertEquals(true, $document->getAttribute('boolean'));
}

$updatedDocuments = $database->find($collection, [
Expand All @@ -3573,6 +3586,7 @@ public function testUpdateDocuments(): void
foreach ($updatedDocuments as $document) {
$this->assertEquals('text📝 updated', $document->getAttribute('string'));
$this->assertGreaterThanOrEqual(5, $document->getAttribute('integer'));
$this->assertEquals(true, $document->getAttribute('boolean'));
}

$controlDocuments = $database->find($collection, [
Expand Down
Loading