Skip to content

Commit

Permalink
tests(cloud_firestore): add additional equality tests (#2942)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehesp authored Jul 13, 2020
1 parent 878e59e commit 8bbc97e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ void main() {
expect(ref == firestore.collection('foo'), isTrue);
expect(ref2 == firestoreSecondary.collection('foo'), isTrue);
expect(ref3 == ref, isFalse);

DocumentReference docRef = firestore.collection('foo').doc('bar');
DocumentReference docRef2 =
firestoreSecondary.collection('foo').doc('bar');

expect(docRef, firestore.collection('foo').doc('bar'));
expect(docRef2, firestoreSecondary.collection('foo').doc('bar'));
expect(docRef == docRef2, isFalse);
});

test('returns the correct id', () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ void main() {

expect(ref == firestoreSecondary.doc('foo/bar'), isFalse);
expect(ref2 == firestoreSecondary.doc('foo/bar/baz/bert'), isFalse);

expect(ref == ref2, isFalse);
});

test("returns document() returns a $DocumentReference", () {
Expand Down

0 comments on commit 8bbc97e

Please sign in to comment.