Skip to content

Commit

Permalink
no force unwrapping in test
Browse files Browse the repository at this point in the history
  • Loading branch information
makoni committed May 23, 2024
1 parent d432db9 commit 159de6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tests/UploadcareTests/RESTAPIIntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,10 @@ final class RESTAPIIntegrationTests: XCTestCase {
let expectation = XCTestExpectation(description: "test27_document_info")

let url = URL(string: "https://source.unsplash.com/featured")!
let data = try! Data(contentsOf: url)
guard let data = try? Data(contentsOf: url) else {
XCTFail("Could not read data from URL")
return
}
DLog("size of file: \(sizeString(ofData: data))")

// upload random image
Expand Down

0 comments on commit 159de6b

Please sign in to comment.