Skip refreshing in local and Feedly accounts if running unit tests.

This commit is contained in:
Brent Simmons committed 2025-10-06 10:59:25 -07:00
1 parent 22ef2f849f
commit 207fe6649f
2 files changed
+7 -2

No files matched your search

@@ -110,7 +110,12 @@ final class FeedlyAccountDelegate: AccountDelegate {
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> 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(()))
@@ -44,7 +44,7 @@ final class LocalAccountDelegate: AccountDelegate {
}
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
guard refreshProgress.isComplete else {
guard refreshProgress.isComplete, !Platform.isRunningUnitTests else {
completion(.success(()))
return
}