Created
July 12, 2012 08:02
Revisions
-
atnan created this gist
Jul 12, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ @implementation CSAccountTests - (void)testGetAPIKeyWithValidCredentials { [self testAsync:^{ CSAPI* validCredentialsAPI; validCredentialsAPI = [[[CSAPI alloc] initWithSiteURL:kCSTestsValidSiteURL username:kCSTestsValidUsername password:kCSTestsValidPassword] autorelease]; [validCredentialsAPI getAPIKey:^(NSString* APIKey){ [self notifyTestFinished]; GHAssertNotNil(APIKey, nil); } errorHandler:[self assertNoError]]; }]; } @end @implementation GHAsyncTestCase (CSConveniences) - (void)testAsync:(void (^)(void))testBlock withTimeout:(NSTimeInterval)timeout { [self prepare]; testBlock(); [self waitForStatus:kGHUnitWaitStatusSuccess timeout:timeout]; } @end