Skip to content

Commit 38b6a9c

Browse files
committed
Added test
1 parent 105109b commit 38b6a9c

File tree

1 file changed

+10
-1
lines changed
  • firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,6 @@ class FirebaseFirestoreTest {
658658
assertEquals(setOf(DocumentWithTimestamp(futureTimestamp)), gtQueryResult)
659659
}
660660

661-
662661
@Test
663662
fun testGeoPointSerialization() = runTest {
664663
@Serializable
@@ -1017,6 +1016,16 @@ class FirebaseFirestoreTest {
10171016
andOrQuery.assertDocuments(FirestoreTest.serializer(), testOne)
10181017
}
10191018

1019+
@Test
1020+
fun testQueryByDocumentId() = runTest {
1021+
setupFirestoreData()
1022+
1023+
val fieldQuery = firestore
1024+
.collection("testFirestoreQuerying")
1025+
.where { FieldPath.documentId equalTo "one" }
1026+
fieldQuery.assertDocuments(FirestoreTest.serializer(), testOne)
1027+
}
1028+
10201029
private suspend fun setupFirestoreData(
10211030
documentOne: FirestoreTest = testOne,
10221031
documentTwo: FirestoreTest = testTwo,

0 commit comments

Comments
 (0)