From 7c538aaa670808f46f5be2059564aae5c67ff31d Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Fri, 19 Jul 2013 11:18:21 -0400 Subject: [PATCH 1/2] Add longer test timeout --- Tests/AFHTTPClientTests.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/AFHTTPClientTests.m b/Tests/AFHTTPClientTests.m index 36ce7c4..5fab52d 100644 --- a/Tests/AFHTTPClientTests.m +++ b/Tests/AFHTTPClientTests.m @@ -257,6 +257,8 @@ } - (void)testPostWithParameters { + [Expecta setAsynchronousTestTimeout:5.0]; + __block id blockResponseObject = nil; [self.client postPath:@"/post" parameters:@{ @"key": @"value" } success:^(AFHTTPRequestOperation *operation, id responseObject) { blockResponseObject = responseObject; From 88e2740378241de6faeeed9551abd3b451cde140 Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Fri, 19 Jul 2013 15:26:27 -0400 Subject: [PATCH 2/2] Make null check wait. --- Tests/AFHTTPClientTests.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/AFHTTPClientTests.m b/Tests/AFHTTPClientTests.m index 5fab52d..d7188b2 100644 --- a/Tests/AFHTTPClientTests.m +++ b/Tests/AFHTTPClientTests.m @@ -265,7 +265,7 @@ } failure:nil]; expect([self.client.operationQueue operationCount]).will.equal(0); - expect(blockResponseObject).notTo.beNil(); + expect(blockResponseObject).willNot.beNil(); expect(blockResponseObject).to.beKindOf([NSData class]); NSError *error = nil;