Created
November 4, 2020 14:25
-
-
Save itirokob/0f4180ec602a79fe40c698bc0b8172cb to your computer and use it in GitHub Desktop.
Testing AppleAuthenticationProviders behavior
This file contains 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 characters
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