From 6506de2cfa4115bf58b883e8553a19ca0a0090b5 Mon Sep 17 00:00:00 2001 From: onevcat Date: Fri, 11 Oct 2024 00:49:23 +0900 Subject: [PATCH] Fix tests --- Tests/KingfisherTests/KingfisherManagerTests.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/KingfisherTests/KingfisherManagerTests.swift b/Tests/KingfisherTests/KingfisherManagerTests.swift index 0e5d95d8f..f4e279239 100644 --- a/Tests/KingfisherTests/KingfisherManagerTests.swift +++ b/Tests/KingfisherTests/KingfisherManagerTests.swift @@ -1592,7 +1592,7 @@ class KingfisherManagerTests: XCTestCase { func testDownloadAndCacheLivePhotoWithSingleResource() async throws { let resource = LivePhotoResource(downloadURL: LivePhotoURL.heic) - stub(resource.downloadURL, data: testImageData) + stub(resource.downloadURL!, data: testImageData) let result = try await manager.downloadAndCache(resources: [resource], options: .init([])) XCTAssertEqual(result.count, 1) @@ -1603,7 +1603,7 @@ class KingfisherManagerTests: XCTestCase { func testDownloadAndCacheLivePhotoWithSingleResourceGuessingUnsupportedExtension() async throws { let resource = LivePhotoResource(downloadURL: URL(string: "https://example.com")!) - stub(resource.downloadURL, data: testImageData) + stub(resource.downloadURL!, data: testImageData) XCTAssertEqual(resource.referenceFileType, .other("")) @@ -1619,7 +1619,7 @@ class KingfisherManagerTests: XCTestCase { func testDownloadAndCacheLivePhotoWithSingleResourceExplicitSetExtension() async throws { let resource = LivePhotoResource(downloadURL: URL(string: "https://example.com")!, fileType: .heic) - stub(resource.downloadURL, data: testImageData) + stub(resource.downloadURL!, data: testImageData) XCTAssertEqual(resource.referenceFileType, .heic) @@ -1635,7 +1635,7 @@ class KingfisherManagerTests: XCTestCase { func testDownloadAndCacheLivePhotoWithSingleResourceGuessingHEICExtension() async throws { let resource = LivePhotoResource(downloadURL: URL(string: "https://example.com")!) - stub(resource.downloadURL, data: partitalHEICData) + stub(resource.downloadURL!, data: partitalHEICData) XCTAssertEqual(resource.referenceFileType, .other("")) @@ -1651,7 +1651,7 @@ class KingfisherManagerTests: XCTestCase { func testDownloadAndCacheLivePhotoWithSingleResourceGuessingMOVExtension() async throws { let resource = LivePhotoResource(downloadURL: URL(string: "https://example.com")!) - stub(resource.downloadURL, data: partitalMOVData) + stub(resource.downloadURL!, data: partitalMOVData) XCTAssertEqual(resource.referenceFileType, .other(""))