File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
FirebaseCore/Tests/SwiftUnit Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -340,22 +340,20 @@ class FirebaseAppTests: XCTestCase {
340
340
// MARK: - Helpers
341
341
342
342
private func expectAppConfigurationNotification( appName: String , isDefaultApp: Bool ) {
343
- let expectedUserInfo : NSDictionary = [
343
+ let expectedUserInfo : [ String : Any ] = [
344
344
" FIRAppNameKey " : appName,
345
345
" FIRAppIsDefaultAppKey " : NSNumber ( value: isDefaultApp) ,
346
346
" FIRGoogleAppIDKey " : Constants . Options. googleAppID,
347
347
]
348
348
349
349
expectation ( forNotification: NSNotification . Name. firAppReadyToConfigureSDK,
350
350
object: FirebaseApp . self, handler: { notification -> Bool in
351
- if let userInfo = notification. userInfo {
352
- if expectedUserInfo. isEqual ( to: userInfo) {
353
- return true
354
- }
355
- } else {
351
+ guard let userInfo = notification. userInfo else {
356
352
XCTFail ( " Failed to unwrap notification user info " )
353
+ return false
357
354
}
358
- return false
355
+ return NSDictionary ( dictionary: expectedUserInfo) ==
356
+ NSDictionary ( dictionary: userInfo)
359
357
} )
360
358
}
361
359
}
You can’t perform that action at this time.
0 commit comments