Fix SwiftData persistence concurrency stability

This commit is contained in:
diyaa
2026-05-29 00:06:57 +02:00
parent e5027152ab
commit ebc187f4a1
19 changed files with 554 additions and 132 deletions
@@ -0,0 +1,30 @@
import XCTest
@testable import VelodyPlayback
final class PlaybackErrorTests: XCTestCase {
func testMissingLocalFileErrorDescriptionIncludesPath() {
let error = PlaybackError.missingLocalFile(path: "/tmp/missing-track.mp3")
XCTAssertEqual(
error.errorDescription,
"The local file could not be found: /tmp/missing-track.mp3"
)
XCTAssertEqual(
error.localizedDescription,
"The local file could not be found: /tmp/missing-track.mp3"
)
}
func testMissingLocalFileErrorDescriptionFallsBackForBlankPath() {
let error = PlaybackError.missingLocalFile(path: " ")
XCTAssertEqual(
error.errorDescription,
"The local file could not be found."
)
XCTAssertEqual(
error.localizedDescription,
"The local file could not be found."
)
}
}