Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Oct 10, 2024
1 parent 7a6306d commit 6506de2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/KingfisherTests/KingfisherManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(""))

Expand All @@ -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)

Expand All @@ -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(""))

Expand All @@ -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(""))

Expand Down

0 comments on commit 6506de2

Please sign in to comment.