I use unit test. Also I use asynchronous requests for retrive data from server. My questions is how can I test this request, cause now my tests work without waiting retriving data.
I using ASIHTTPRequest for get data from the server. There is how I check my request
- (void)testSignIn {
self.request = [[Requests alloc] init];
[self.request signInWithEmail:@"some.email@gmail.com" andPassword:@"123456"];
}
Here I have a problem. If in this method I will insert STFail befaore I get response it will complete with error in each time (because retrive data will take it some time and this is not a synchronize reuest)
How to resolve this problem?