Skip to content

Commit f9dc90e

Browse files
committed
Add unit test for temporary database configuration
1 parent a5a532b commit f9dc90e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sqliter-driver/src/nativeCommonTest/kotlin/co/touchlab/sqliter/DatabaseConfigurationTest.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ class DatabaseConfigurationTest : BaseDatabaseTest(){
5858
assertEquals(":memory:", dbPathString)
5959
}
6060

61+
@Test
62+
fun temporaryOnlyTest(){
63+
val conf = DatabaseConfiguration(
64+
name = "",
65+
inMemory = false,
66+
version = 1,
67+
create = {},
68+
extendedConfig = DatabaseConfiguration.Extended(basePath = ""),
69+
)
70+
val dbPathString = diskOrMemoryPath(conf)
71+
assertEquals("", dbPathString)
72+
}
73+
6174
@Test
6275
fun memoryPathTest(){
6376
val conf = DatabaseConfiguration(

0 commit comments

Comments
 (0)