mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 09:50:16 +00:00
Skip refreshing in local and Feedly accounts if running unit tests.
This commit is contained in:
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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user