Skip to content

Commit 897c0dc

Browse files
committed
chore(): updated fetchAuthSession Unit Test
1 parent 87fcae1 commit 897c0dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/amplify_datastore/example/ios/unit_tests/NativeAuthPluginTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class NativeAuthPluginTests: XCTestCase {
5252
let nativePlugin = NativeAuthPlugin(binaryMessenger: binaryMessenger)
5353
let expectation = expectation(description: "fetchAuthSession completes")
5454
nativePlugin.fetchAuthSession { result in
55+
defer { expectation.fulfill() }
5556
switch result {
56-
case .success(let session):
57-
defer { expectation.fulfill() }
58-
XCTAssertEqual(session.isSignedIn, isSignedIn)
59-
case .failure(let error):
60-
XCTFail("fetchAuthSession failed with error: \(error)")
57+
case .success(let session):
58+
XCTAssertEqual(session.isSignedIn, isSignedIn)
59+
case .failure(let error):
60+
XCTFail("fetchAuthSession failed with error: \(error)")
6161
}
6262
}
6363
waitForExpectations(timeout: 1)

0 commit comments

Comments
 (0)