Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Use computed property instead of method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessy Catterwaul committed Apr 29, 2022
1 parent 47bdc63 commit 3ccaf1c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Emitron/emitronTests/Downloads/DownloadQueueManagerTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3ccaf1c

Please sign in to comment.