Skip to content

Commit 8127161

Browse files
committed
Drop fetch helper
1 parent 87e187d commit 8127161

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Tests/AppTests/ErrorReportingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ErrorReportingTests: AppTestCase {
2525
error: AppError.cacheDirectoryDoesNotExist(pkg.id, "path"),
2626
stage: .ingestion)
2727
do {
28-
let pkg = try fetch(id: pkg.id, on: app.db)
28+
let pkg = try await XCTUnwrapAsync(try await Package.find(pkg.id, on: app.db))
2929
XCTAssertEqual(pkg.status, .cacheDirectoryDoesNotExist)
3030
XCTAssertEqual(pkg.processingStage, .ingestion)
3131
}

Tests/AppTests/Util.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,6 @@ func savePackages(on db: Database, _ urls: [URL],
128128
}
129129

130130

131-
func fetch(id: Package.Id?, on db: Database, file: StaticString = #file, line: UInt = #line) throws -> Package {
132-
try XCTUnwrap(try Package.find(id, on: db).wait(), file: (file), line: line)
133-
}
134-
135-
136131
// MARK: - Client mocking
137132

138133

0 commit comments

Comments
 (0)