File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/amplify_datastore/example/ios/unit_tests Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,14 @@ class NativeAuthPluginTests: XCTestCase {
51
51
let binaryMessenger = MockBinaryMessenger ( isSignedIn: isSignedIn)
52
52
let nativePlugin = NativeAuthPlugin ( binaryMessenger: binaryMessenger)
53
53
let expectation = expectation ( description: " fetchAuthSession completes " )
54
- nativePlugin. fetchAuthSession { session in
55
- defer { expectation. fulfill ( ) }
56
- XCTAssertNotNil ( session)
57
- XCTAssertEqual ( session. isSignedIn, isSignedIn)
54
+ nativePlugin. fetchAuthSession { result in
55
+ switch result {
56
+ case . success( let session) :
57
+ defer { expectation. fulfill ( ) }
58
+ assertSession ( session, isSignedIn)
59
+ case . failure( let error) :
60
+ XCTFail ( " fetchAuthSession failed with error: \( error) " )
61
+ }
58
62
}
59
63
waitForExpectations ( timeout: 1 )
60
64
}
You can’t perform that action at this time.
0 commit comments