diff options
Diffstat (limited to 'Firestore/Example/Tests/Util/XCTestCase+Await.m')
-rw-r--r-- | Firestore/Example/Tests/Util/XCTestCase+Await.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Firestore/Example/Tests/Util/XCTestCase+Await.m b/Firestore/Example/Tests/Util/XCTestCase+Await.m index 15c67ca..7f4356c 100644 --- a/Firestore/Example/Tests/Util/XCTestCase+Await.m +++ b/Firestore/Example/Tests/Util/XCTestCase+Await.m @@ -35,4 +35,12 @@ static const double kExpectationWaitSeconds = 10.0; return kExpectationWaitSeconds; } +- (FSTVoidErrorBlock)completionForExpectationWithName:(NSString *)expectationName { + XCTestExpectation *expectation = [self expectationWithDescription:expectationName]; + return ^(NSError *error) { + XCTAssertNil(error); + [expectation fulfill]; + }; +} + @end |