Skip to content

Commit 8bbc97e

Browse files
authored
tests(cloud_firestore): add additional equality tests (#2942)
1 parent 878e59e commit 8bbc97e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/cloud_firestore/cloud_firestore/test/collection_reference_test.dart

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ void main() {
4646
expect(ref == firestore.collection('foo'), isTrue);
4747
expect(ref2 == firestoreSecondary.collection('foo'), isTrue);
4848
expect(ref3 == ref, isFalse);
49+
50+
DocumentReference docRef = firestore.collection('foo').doc('bar');
51+
DocumentReference docRef2 =
52+
firestoreSecondary.collection('foo').doc('bar');
53+
54+
expect(docRef, firestore.collection('foo').doc('bar'));
55+
expect(docRef2, firestoreSecondary.collection('foo').doc('bar'));
56+
expect(docRef == docRef2, isFalse);
4957
});
5058

5159
test('returns the correct id', () {

packages/cloud_firestore/cloud_firestore/test/document_reference_test.dart

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ void main() {
3939

4040
expect(ref == firestoreSecondary.doc('foo/bar'), isFalse);
4141
expect(ref2 == firestoreSecondary.doc('foo/bar/baz/bert'), isFalse);
42+
43+
expect(ref == ref2, isFalse);
4244
});
4345

4446
test("returns document() returns a $DocumentReference", () {

0 commit comments

Comments
 (0)