Add tests for Find functions
This commit is contained in:
@@ -233,7 +233,7 @@ class FieldTest {
|
||||
@DisplayName("toWhere generates for inArray (PostgreSQL)")
|
||||
fun toWhereInArrayPostgres() {
|
||||
Configuration.connectionString = ":postgresql:"
|
||||
assertEquals("data->'even' ?| ARRAY[:it_0, :it_1, :it_2, :it_3]",
|
||||
assertEquals("data->'even' ??| ARRAY[:it_0, :it_1, :it_2, :it_3]",
|
||||
Field.inArray("even", "tbl", listOf(2, 4, 6, 8), ":it").toWhere(),
|
||||
"Field WHERE clause not generated correctly")
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class OpTest {
|
||||
@Test
|
||||
@DisplayName("IN_ARRAY uses proper SQL")
|
||||
fun inArraySQL() {
|
||||
assertEquals("?|", Op.IN_ARRAY.sql, "The SQL for in-array is incorrect")
|
||||
assertEquals("??|", Op.IN_ARRAY.sql, "The SQL for in-array is incorrect")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user