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 {
5151 let binaryMessenger = MockBinaryMessenger ( isSignedIn: isSignedIn)
5252 let nativePlugin = NativeAuthPlugin ( binaryMessenger: binaryMessenger)
5353 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+ }
5862 }
5963 waitForExpectations ( timeout: 1 )
6064 }
You can’t perform that action at this time.
0 commit comments