Skip to content

Commit

Permalink
Merge pull request #242 from thejoeba/add-database-reference-testing
Browse files Browse the repository at this point in the history
Add database reference testing
  • Loading branch information
nbransby authored Apr 1, 2022
2 parents 8d83005 + f67d1c1 commit 96ccf89
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit 96ccf89

Please sign in to comment.