diff --git a/FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift b/FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift index ee23b54df5f..61922fbe740 100644 --- a/FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift +++ b/FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift @@ -340,7 +340,7 @@ class FirebaseAppTests: XCTestCase { // MARK: - Helpers private func expectAppConfigurationNotification(appName: String, isDefaultApp: Bool) { - let expectedUserInfo: NSDictionary = [ + let expectedUserInfo: [String: Any] = [ "FIRAppNameKey": appName, "FIRAppIsDefaultAppKey": NSNumber(value: isDefaultApp), "FIRGoogleAppIDKey": Constants.Options.googleAppID, @@ -348,14 +348,12 @@ class FirebaseAppTests: XCTestCase { expectation(forNotification: NSNotification.Name.firAppReadyToConfigureSDK, object: FirebaseApp.self, handler: { notification -> Bool in - if let userInfo = notification.userInfo { - if expectedUserInfo.isEqual(to: userInfo) { - return true - } - } else { + guard let userInfo = notification.userInfo else { XCTFail("Failed to unwrap notification user info") + return false } - return false + return NSDictionary(dictionary: expectedUserInfo) == + NSDictionary(dictionary: userInfo) }) } }