Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed Apr 3, 2024
1 parent 105109b commit 38b6a9c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@ class FirebaseFirestoreTest {
assertEquals(setOf(DocumentWithTimestamp(futureTimestamp)), gtQueryResult)
}


@Test
fun testGeoPointSerialization() = runTest {
@Serializable
Expand Down Expand Up @@ -1017,6 +1016,16 @@ class FirebaseFirestoreTest {
andOrQuery.assertDocuments(FirestoreTest.serializer(), testOne)
}

@Test
fun testQueryByDocumentId() = runTest {
setupFirestoreData()

val fieldQuery = firestore
.collection("testFirestoreQuerying")
.where { FieldPath.documentId equalTo "one" }
fieldQuery.assertDocuments(FirestoreTest.serializer(), testOne)
}

private suspend fun setupFirestoreData(
documentOne: FirestoreTest = testOne,
documentTwo: FirestoreTest = testTwo,
Expand Down

0 comments on commit 38b6a9c

Please sign in to comment.