diff --git a/Classes/BITAuthenticator_Private.h b/Classes/BITAuthenticator_Private.h index 667e6192e0..4eb13c154c 100644 --- a/Classes/BITAuthenticator_Private.h +++ b/Classes/BITAuthenticator_Private.h @@ -131,4 +131,6 @@ - (void) validationSucceededWithCompletion:(tValidationCompletion) completion; - (void) validationFailedWithError:(NSError *) validationError completion:(tValidationCompletion) completion; +#pragma mark - Helpers for testing +- (tValidationCompletion) defaultValidationCompletionBlock; @end diff --git a/Support/HockeySDKTests/BITAuthenticatorTests.m b/Support/HockeySDKTests/BITAuthenticatorTests.m index 07f75a971b..1a09aafcd2 100644 --- a/Support/HockeySDKTests/BITAuthenticatorTests.m +++ b/Support/HockeySDKTests/BITAuthenticatorTests.m @@ -375,7 +375,7 @@ static void *kInstallationIdentification = &kInstallationIdentification; _sut.validationType = BITAuthenticatorValidationTypeOnAppActive; [_sut validationFailedWithError:[NSError errorWithDomain:kBITAuthenticatorErrorDomain code:0 userInfo:nil] - completion:nil]; + completion:_sut.defaultValidationCompletionBlock]; [verifyCount(delegateMock, times(1)) authenticator:_sut willShowAuthenticationController:(id)anything()]; } @@ -385,7 +385,7 @@ static void *kInstallationIdentification = &kInstallationIdentification; _sut.validationType = BITAuthenticatorValidationTypeOptional; [_sut validationFailedWithError:nil - completion:nil]; + completion:_sut.defaultValidationCompletionBlock]; [verifyCount(delegateMock, never()) authenticator:_sut willShowAuthenticationController:(id)anything()]; }