Skip to content

Commit 2f7abc3

Browse files
committed
fix tests for postgre
1 parent efc04bc commit 2f7abc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/system/Models/DeleteModelTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ public function testOnlyDeleted(): void
164164
public function testDontThrowExceptionWhenSoftDeleteConditionIsSetWithEmptyValue($emptyValue): void
165165
{
166166
$this->createModel(UserModel::class);
167+
168+
if ($this->db->DBDriver === 'Postgre' && in_array($emptyValue, ['', true, false], true)) {
169+
$this->markTestSkipped('PostgreSQL does not allow empty string, true, or false for integer columns');
170+
}
171+
167172
$this->seeInDatabase('user', ['name' => 'Derek Jones', 'deleted_at IS NULL' => null]);
168173

169174
$this->model->where('id', $emptyValue)->delete();

0 commit comments

Comments
 (0)