Skip to content

Commit

Permalink
Merge pull request #292 from mohssenfathi/fix-auth-code-provider-tests
Browse files Browse the repository at this point in the history
Uses test credentials for AuthorizationCodeAuthProviderTests
  • Loading branch information
mohssenfathi authored Mar 19, 2024
2 parents 61c130d + 6ea67f1 commit 026087d
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ import XCTest

final class AuthorizationCodeAuthProviderTests: XCTestCase {

private let configurationProvider: ConfigurationProviding = ConfigurationProvidingMock(
clientID: "test_client_id",
redirectURI: "test://"
)

func test_executeInAppLogin_createsAuthenticationSession() {

let provider = AuthorizationCodeAuthProvider()
let provider = AuthorizationCodeAuthProvider(
configurationProvider: configurationProvider
)

XCTAssertNil(provider.currentSession)

Expand Down Expand Up @@ -42,7 +49,9 @@ final class AuthorizationCodeAuthProviderTests: XCTestCase {
}

func test_execute_existingSession_returnsExistingAuthSessionError() {
let provider = AuthorizationCodeAuthProvider()
let provider = AuthorizationCodeAuthProvider(
configurationProvider: configurationProvider
)

provider.execute(
authDestination: .inApp,
Expand Down

0 comments on commit 026087d

Please sign in to comment.