mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Add UTs
This commit is contained in:
+11
-1
@@ -44,5 +44,15 @@ class MockNotificationSettingsService: NotificationSettingsServiceType, Observab
|
||||
keywords.remove(keyword)
|
||||
}
|
||||
|
||||
func updatePushRuleActions(for ruleId: String, enabled: Bool, actions: NotificationActions?, completion: ((Result<Void, Error>) -> Void)?) { }
|
||||
func updatePushRuleActions(for ruleId: String, enabled: Bool, actions: NotificationActions?, completion: ((Result<Void, Error>) -> Void)?) {
|
||||
guard let ruleIndex = rules.firstIndex(where: { $0.ruleId == ruleId }) else {
|
||||
completion?(.failure(NSError(domain: "fake", code: 0)))
|
||||
return
|
||||
}
|
||||
|
||||
rules[ruleIndex] = MockNotificationPushRule(ruleId: ruleId,
|
||||
enabled: enabled,
|
||||
actions: actions)
|
||||
completion?(.success(()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user