diff --git a/Emitron/emitronTests/Downloads/DownloadQueueManagerTest.swift b/Emitron/emitronTests/Downloads/DownloadQueueManagerTest.swift index bca9c841..27d61fea 100644 --- a/Emitron/emitronTests/Downloads/DownloadQueueManagerTest.swift +++ b/Emitron/emitronTests/Downloads/DownloadQueueManagerTest.swift @@ -207,15 +207,17 @@ final class DownloadQueueManagerTest: XCTestCase, DatabaseTestCase { // MARK: - private private extension DownloadQueueManagerTest { - func sampleDownload() async throws -> Download { - let screencast = ContentTest.Mocks.screencast - let result = try await downloadService.requestDownload(contentID: screencast.0.id) { _ in - .init(content: screencast.0, cacheUpdate: screencast.1) - } + var sampleDownload: Download { + get async throws { + let screencast = ContentTest.Mocks.screencast + let result = try await downloadService.requestDownload(contentID: screencast.0.id) { _ in + .init(content: screencast.0, cacheUpdate: screencast.1) + } - XCTAssertEqual(result, .downloadRequestedButQueueInactive) + XCTAssertEqual(result, .downloadRequestedButQueueInactive) - return try XCTUnwrap(allDownloads.first) + return try XCTUnwrap(allDownloads.first) + } } @discardableResult func samplePersistedDownload(state: Download.State = .pending) async throws -> Download {