Skip to content

Commit 2114633

Browse files
committed
Test with int as text
1 parent e7a938c commit 2114633

File tree

1 file changed

+13
-1
lines changed
  • core/src/commonIntegrationTest/kotlin/com/powersync

1 file changed

+13
-1
lines changed

core/src/commonIntegrationTest/kotlin/com/powersync/CrudTest.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class CrudTest {
125125
)
126126
}
127127

128-
val batch = database.getNextCrudTransaction()!!
128+
var batch = database.getNextCrudTransaction()!!
129129
batch.crud[0].data shouldBe
130130
mapOf(
131131
"a" to "text",
@@ -144,5 +144,17 @@ class CrudTest {
144144
"a" to "text",
145145
"b" to 42,
146146
)
147+
148+
database.execute("DELETE FROM ps_crud")
149+
database.execute(
150+
"UPDATE foo SET a = ?",
151+
listOf("42"),
152+
)
153+
154+
batch = database.getNextCrudTransaction()!!
155+
batch.crud[0].data shouldBe
156+
mapOf(
157+
"a" to "42", // Not an integer!
158+
)
147159
}
148160
}

0 commit comments

Comments
 (0)