mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
Fix test.
This commit is contained in:
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user