I am attempting to write unit tests for an iOS application which makes use of the Parse backend framework, and after much experimentation seem to be failing at writing succe
With the macro WAIT_WHILE( in https://github.com/hfossli/AGAsyncTestHelper/ you can write
- (void)testSaveUser
{
__block BOOL saved = NO;
[PFUser saveUser:userModelMock withBlock:^(BOOL success, NSError *error) {
saved = YES;
}];
WAIT_WHILE(!saved, 10.0, @"Failed to save user within 10 seconds timeframe);
}