Skip to content

Instantly share code, notes, and snippets.

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