File tree 1 file changed +24
-0
lines changed
Firestore/Example/Tests/Integration/API 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,30 @@ - (void)testGetCollectionWhileOnlineWithDefaultSource {
69
69
]));
70
70
}
71
71
72
+ - (void )testGetDocumentError {
73
+ FIRDocumentReference *doc = [self .db documentWithPath: @" foo/__invalid__" ];
74
+
75
+ XCTestExpectation *completed = [self expectationWithDescription: @" get completed" ];
76
+ [doc getDocumentWithCompletion: ^(FIRDocumentSnapshot *snapshot, NSError *error) {
77
+ XCTAssertNotNil (error);
78
+ [completed fulfill ];
79
+ }];
80
+
81
+ [self awaitExpectations ];
82
+ }
83
+
84
+ - (void )testGetCollectionError {
85
+ FIRCollectionReference *col = [self .db collectionWithPath: @" __invalid__" ];
86
+
87
+ XCTestExpectation *completed = [self expectationWithDescription: @" get completed" ];
88
+ [col getDocumentsWithCompletion: ^(FIRQuerySnapshot *snapshot, NSError *error) {
89
+ XCTAssertNotNil (error);
90
+ [completed fulfill ];
91
+ }];
92
+
93
+ [self awaitExpectations ];
94
+ }
95
+
72
96
- (void )testGetDocumentWhileOfflineWithDefaultSource {
73
97
FIRDocumentReference *doc = [self documentRef ];
74
98
You can’t perform that action at this time.
0 commit comments