Fix test.

This commit is contained in:
Brent Simmons committed 2026-10-26 19:52:32 -07:00
1 parent 41d9b754b3
commit fa4c03d94b
1 file changed
+2 -2
@@ -16,12 +16,12 @@ import UniformTypeIdentifiers
@Test func thumbnailTooSmallIsRejected() async throws {
let configuration = ImageDownloader.Configuration(cacheFolderName: "Test", maxPixelSize: 512, format: .jpeg(compressionQuality: 0.8), memoryCacheByteLimit: 0, requiresSignificantDimensions: true, downloadLimiter: nil)
let smallImageData = try #require(pngData(width: 72, height: 72))
let smallImageData = try #require(pngData(width: 48, height: 48))
await #expect {
_ = try await ImageDownloader.scaledImageData(smallImageData, statusCode: 200, configuration: configuration)
} throws: { error in
(error as? ImageDownloadError)?.rejectedPixelSize?.width == 72
(error as? ImageDownloadError)?.rejectedPixelSize?.width == 48
}
}
}