Skip to content

Commit 8576cf3

Browse files
committed
Merge branch 'serialize_sealed_classes' of https://github.com/iruizmar/firebase-kotlin-sdk into serialize_sealed_classes
2 parents a9a2051 + df30acb commit 8576cf3

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

firebase-database/src/commonTest/kotlin/dev.gitlive.firebase.database/database.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ expect val emulatorHost: String
1313
expect val context: Any
1414
expect fun runTest(test: suspend () -> Unit)
1515

16-
class database {
16+
class FirebaseDatabaseTest {
1717

1818
@Serializable
1919
data class FirebaseDatabaseChildTest(val prop1: String? = null, val time: Double = 0.0)
@@ -38,6 +38,21 @@ class database {
3838
}
3939
}
4040

41+
@Test
42+
fun testSetValue() = runTest {
43+
val testValue = "test"
44+
val testReference = Firebase.database.reference("testPath")
45+
46+
testReference.setValue(testValue)
47+
48+
val testReferenceValue = testReference
49+
.valueEvents
50+
.first()
51+
.value<String>()
52+
53+
assertEquals(testValue, testReferenceValue)
54+
}
55+
4156
@Test
4257
fun testChildCount() = runTest {
4358
setupRealtimeData()

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ firebase-app.skipIosTests=false
2525
firebase-auth.skipIosTests=true
2626
firebase-common.skipIosTests=false
2727
firebase-config.skipIosTests=false
28-
firebase-database.skipIosTests=true
28+
firebase-database.skipIosTests=false
2929
firebase-firestore.skipIosTests=false
3030
firebase-functions.skipIosTests=false
3131
firebase-installations.skipIosTests=false

0 commit comments

Comments
 (0)