mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Set up Analytics to track data per session (#780)
This commit is contained in:
@@ -27,9 +27,14 @@ final class NotificationManagerTests: XCTestCase {
|
||||
private var shouldDisplayInAppNotificationReturnValue = false
|
||||
private var handleInlineReplyDelegateCalled = false
|
||||
private var notificationTappedDelegateCalled = false
|
||||
private let settings = ServiceLocator.shared.settings
|
||||
private var settings: AppSettings!
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.configureWithSuiteName("io.element.elementx.unitests")
|
||||
AppSettings.reset()
|
||||
settings = AppSettings()
|
||||
ServiceLocator.shared.register(appSettings: settings)
|
||||
|
||||
notificationManager = NotificationManager(notificationCenter: notificationCenter)
|
||||
notificationManager.start()
|
||||
notificationManager.setClientProxy(clientProxy)
|
||||
@@ -114,7 +119,7 @@ final class NotificationManagerTests: XCTestCase {
|
||||
|
||||
func test_whenStart_requestAuthorizationCalledWithCorrectParams() async throws {
|
||||
notificationManager.requestAuthorization()
|
||||
await Task.yield()
|
||||
try await Task.sleep(for: .milliseconds(100))
|
||||
XCTAssertEqual(notificationCenter.requestAuthorizationOptions, [.alert, .sound, .badge])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user