Skip to content

Commit 35bcff7

Browse files
committed
fix
1 parent 1e7e72e commit 35bcff7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/model/Values.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ internal object Values {
677677
is GeoPoint -> encodeValue(value)
678678
is Blob -> encodeValue(value)
679679
is DocumentReference -> encodeValue(value)
680+
is VectorValue -> encodeValue(value)
680681
else -> throw IllegalArgumentException("Unexpected type: $value")
681682
}
682683
}

firebase-firestore/src/testUtil/java/com/google/firebase/firestore/TestAccessHelper.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@
1515
package com.google.firebase.firestore;
1616

1717
import static org.mockito.Mockito.mock;
18+
import static org.mockito.Mockito.when;
1819

20+
import com.google.firebase.firestore.model.DatabaseId;
1921
import com.google.firebase.firestore.model.DocumentKey;
2022

2123
public final class TestAccessHelper {
2224

2325
/** Makes the DocumentReference constructor accessible. */
2426
public static DocumentReference createDocumentReference(DocumentKey documentKey) {
2527
// We can use mock here because the tests only use this as a wrapper for documentKeys.
26-
return new DocumentReference(documentKey, mock(FirebaseFirestore.class));
28+
FirebaseFirestore mock = mock(FirebaseFirestore.class);
29+
when(mock.getDatabaseId()).thenReturn(DatabaseId.forProject("project"));
30+
return new DocumentReference(documentKey, mock);
2731
}
2832

2933
/** Makes the getKey() method accessible. */

0 commit comments

Comments
 (0)