@@ -1417,17 +1417,16 @@ - (void)testWaitForPendingWritesCompletes {
1417
1417
}
1418
1418
1419
1419
- (void )testWaitForPendingWritesFailsWhenUserChanges {
1420
- FIRApp *app = testutil::AppForUnitTesting (util::MakeString ([FSTIntegrationTestCase projectID ]));
1421
- FIRFirestore *firestore = [self firestoreWithApp: app];
1420
+ // FIRApp *app = testutil::AppForUnitTesting(util::MakeString([FSTIntegrationTestCase
1421
+ // projectID]));
1422
+ FIRFirestore *firestore = self.db ;
1422
1423
1423
- [firestore
1424
- disableNetworkWithCompletion: [self completionForExpectationWithName: @" Disable network" ]];
1425
- [self awaitExpectations ];
1424
+ [self disableNetwork ];
1426
1425
1427
1426
// Writes to local to prevent immediate call to the completion of waitForPendingWrites.
1428
1427
NSDictionary <NSString *, id > *data =
1429
- @{@" owner" : @{@" name" : @" Andy" , @" email" : @" abc@xyz .com" }};
1430
- [[firestore documentWithPath: @" abc/123 " ] setData: data];
1428
+ @{@" owner" : @{@" name" : @" Andy" , @" email" : @" abc@example .com" }};
1429
+ [[self documentRef ] setData: data];
1431
1430
1432
1431
XCTestExpectation *expectation = [self expectationWithDescription: @" waitForPendingWrites" ];
1433
1432
[firestore waitForPendingWritesWithCompletion: ^(NSError *_Nullable error) {
@@ -1442,8 +1441,7 @@ - (void)testWaitForPendingWritesFailsWhenUserChanges {
1442
1441
}
1443
1442
1444
1443
- (void )testWaitForPendingWritesCompletesWhenOfflineIfNoPending {
1445
- FIRDocumentReference *doc = [self documentRef ];
1446
- FIRFirestore *firestore = doc.firestore ;
1444
+ FIRFirestore *firestore = self.db ;
1447
1445
1448
1446
[firestore
1449
1447
disableNetworkWithCompletion: [self completionForExpectationWithName: @" Disable network" ]];
0 commit comments