mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remove Task.sleep from NotificationTests. (#1326)
- Add `weak` to mock variables called `delegate` - Delete `UserNotificationCenterSpy` and use `UserNotificationCenterMock` - Remove Task.sleep in favour of mock closures along with expectations/fulfillment.
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
import Foundation
|
||||
import UserNotifications
|
||||
|
||||
// Sadly we can't mock this because the delegate needs to be weak
|
||||
// Use UserNotificationCenterSpy
|
||||
protocol UserNotificationCenterProtocol: AnyObject {
|
||||
var delegate: UNUserNotificationCenterDelegate? { get set }
|
||||
func add(_ request: UNNotificationRequest) async throws
|
||||
|
||||
Reference in New Issue
Block a user