Skip to content

Commit

Permalink
Fix tests for non-optional value
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Jun 14, 2024
1 parent a5878df commit 754d5b9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Tests/KingfisherTests/ImageDownloaderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ class ImageDownloaderTests: XCTestCase {
delay(0.1) { exp.fulfill() }
}

XCTAssertNotNil(task)
task!.cancel()
XCTAssertTrue(task.isInitialized)
task.cancel()

_ = stub.go()

Expand Down Expand Up @@ -412,9 +412,8 @@ class ImageDownloaderTests: XCTestCase {
group.leave()
}

XCTAssertNotNil(downloadTask)

downloadTask!.cancel()
XCTAssertTrue(downloadTask.isInitialized)
downloadTask.cancel()
_ = stub.go()

group.enter()
Expand Down

0 comments on commit 754d5b9

Please sign in to comment.