Skip to content

Commit

Permalink
chore(): updated fetchAuthSession Unit Test
Browse files Browse the repository at this point in the history
  • Loading branch information
tyllark committed Feb 22, 2025
1 parent cf0712a commit ef7e39b
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MockBinaryMessenger: NSObject, FlutterBinaryMessenger {
identityId: nil,
awsCredentials: nil
)
let encodedAuthSession = codec.encode(authSession)
let encodedAuthSession = codec.encode([authSession])
callback?(encodedAuthSession)
}

Expand All @@ -56,23 +56,18 @@ class NativeAuthPluginTests: XCTestCase {
switch result {
case .success(let session):
XCTAssertEqual(session.isSignedIn, isSignedIn)
break
case .failure(let error):
print("fetchAuthSession failed with error: \(error)")
XCTFail("fetchAuthSession failed with error: \(error)")
break
}
}
waitForExpectations(timeout: 1)
}

func testFetchAuthSessionSignedIn() {
print("testFetchAuthSessionSignedIn")
fetchAuthSession(isSignedIn: true)
}

func testFetchAuthSessionSignedOut() {
print("testFetchAuthSessionSignedOut")
fetchAuthSession(isSignedIn: false)
}

Expand Down

0 comments on commit ef7e39b

Please sign in to comment.