Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Testing AppleAuthenticationProviders behavior
func test_didFetchAuthorizationCredential_shouldCallDelegatesDidCompleteWithCredential() {
//Given
let sut = AppleAuthenticationProvider()
sut.delegate = delegateSpy
let mockedCredential: ASAuthorizationAppleIDCredentialProtocol = MockedCredential()
//When
sut.didFetch(authorizationCredential: mockedCredential)
//Then
XCTAssertEqual(delegateSpy.authorizationCredentialPassed, mockedCredential)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment