diff --git a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift index a3c0f9f48..cd7300c4c 100644 --- a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift +++ b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift @@ -110,7 +110,12 @@ final class FeedlyAccountDelegate: AccountDelegate { func refreshAll(for account: Account, completion: @escaping (Result) -> Void) { assert(Thread.isMainThread) - + + guard !Platform.isRunningUnitTests else { + Self.logger.debug("Feedly: Ignoring refreshAll: running unit tests") + completion(.success(())) + return + } guard currentSyncAllOperation == nil else { Self.logger.debug("Feedly: Ignoring refreshAll: sync already in progress") completion(.success(())) diff --git a/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift b/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift index 0dcc5148f..557ce3247 100644 --- a/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift @@ -44,7 +44,7 @@ final class LocalAccountDelegate: AccountDelegate { } func refreshAll(for account: Account, completion: @escaping (Result) -> Void) { - guard refreshProgress.isComplete else { + guard refreshProgress.isComplete, !Platform.isRunningUnitTests else { completion(.success(())) return }