Skip to content

Commit 165f6c9

Browse files
author
Joey Heck
committed
Issue-241 added test to validate setValue works
1 parent b559b99 commit 165f6c9

File tree

1 file changed

+15
-0
lines changed
  • firebase-database/src/commonTest/kotlin/dev.gitlive.firebase.database

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,19 @@ class database {
3434
Firebase.database.useEmulator(emulatorHost, 8080)
3535
}
3636
}
37+
38+
@Test
39+
fun testSetValue() = runTest {
40+
val testValue = "test"
41+
val testReference = Firebase.database.reference("testPath")
42+
43+
testReference.setValue(testValue)
44+
45+
val testReferenceValue = testReference
46+
.valueEvents
47+
.first()
48+
.value<String>()
49+
50+
assertEquals(testValue, testReferenceValue)
51+
}
3752
}

0 commit comments

Comments
 (0)