File tree Expand file tree Collapse file tree 1 file changed +9
-17
lines changed
sqliter-driver/src/nativeCommonTest/kotlin/co/touchlab/sqliter Expand file tree Collapse file tree 1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -255,17 +255,6 @@ class DatabaseConnectionTest {
255255
256256 assertEquals(1 , conn1.longForQuery(" select count(*) from test" ))
257257
258- assertFails {
259- val connFail = man.surpriseMeConnection()
260- connFail.withTransaction {
261- it.withStatement(" insert into test(num, str)values(?,?)" ) {
262- bindLong(1 , 232 )
263- bindString(2 , " asdf" )
264- executeInsert()
265- }
266- }
267- }
268-
269258 val man2 = createDatabaseManager(
270259 conf
271260 )
@@ -276,20 +265,23 @@ class DatabaseConnectionTest {
276265 bindString(2 , " asdf" )
277266 executeInsert()
278267 }
268+ it.withStatement(" insert into test(num, str)values(?,?)" ) {
269+ bindLong(1 , 233 )
270+ bindString(2 , " asdfg" )
271+ executeInsert()
272+ }
279273 }
280274
281- assertEquals(1 , conn2 .longForQuery(" select count(*) from test" ))
275+ assertEquals(1 , conn1 .longForQuery(" select count(*) from test" ))
282276
283277 conn1.close()
284278
285- assertEquals(1 , conn2.longForQuery(" select count(*) from test" ))
279+ assertEquals(2 , conn2.longForQuery(" select count(*) from test" ))
286280
287281 conn2.close()
288282
289- assertFails {
290- man.withConnection {
291- assertEquals(0 , it.longForQuery(" select count(*) from test" ))
292- }
283+ man.withConnection {
284+ assertEquals(0 , it.longForQuery(" select count(*) from test" ))
293285 }
294286 }
295287
You can’t perform that action at this time.
0 commit comments