Skip to content

Add database reference testing #242

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 7 commits into from
Apr 1, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ class FirebaseDatabaseTest {
}
}

@Test
fun testSetValue() = runTest {
val testValue = "test"
val testReference = Firebase.database.reference("testPath")

testReference.setValue(testValue)

val testReferenceValue = testReference
.valueEvents
.first()
.value<String>()

assertEquals(testValue, testReferenceValue)
}

@Test
fun testChildCount() = runTest {
setupRealtimeData()
Expand Down