Files
damus/damusTests/DamusCacheManagerTests.swift
Daniel D’Aquino 71c36052e2 Fix onboarding crash
This commit fixes a crash that occurred when clicking "follow all"
during onboarding.

This fix works by making `Contacts` and `PostBox` isolated into a
specific Swift Actor, and updating direct and indirect usages
accordingly.

Changelog-Fixed: Fixed a crash that occurred when clicking "follow all" during onboarding.
Closes: https://github.com/damus-io/damus/issues/3422
Co-authored-by: alltheseas <64376233+alltheseas@users.noreply.github.com>
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-01-05 17:28:06 -08:00

33 lines
848 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// DamusCacheManagerTests.swift
// damusTests
//
// Created by Daniel DAquino on 2023-10-04.
//
import Foundation
import Foundation
import XCTest
@testable import damus
import SwiftUI
final class DamusCacheManagerTests: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
/// Simple smoke test to check if clearing cache will crash the system
@MainActor
func testCacheManagerSmoke() throws {
for _ in Range(0...20) {
DamusCacheManager.shared.clear_cache(damus_state: test_damus_state)
}
}
}