Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Nov 10, 2023
1 parent 36aea44 commit b25a975
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ErrorHandlingServiceTests: XCTestCase {

let error5 = KukaiError.systemError(subType: URLError(URLError.unknown))
XCTAssert(error5.rpcErrorString == nil, error5.rpcErrorString ?? "-")
XCTAssert(error5.description == "System: Error Domain=NSURLErrorDomain Code=-1 \"(null)\"", error5.description)
XCTAssert(error5.description == "System: The operation couldn’t be completed. (NSURLErrorDomain error -1.)", error5.description)

let context = DecodingError.Context(codingPath: [CodingKeysTest.testKey], debugDescription: "coding-key-test description")
let decodingError = DecodingError.typeMismatch(String.self, context)
Expand All @@ -55,7 +55,7 @@ class ErrorHandlingServiceTests: XCTestCase {

let error1 = ErrorHandlingService.searchForSystemError(data: sameplData, response: successURLResponse, networkError: URLError(URLError.notConnectedToInternet), requestURL: requestURL, requestData: nil)
XCTAssert(error1?.errorType == .system)
XCTAssert(error1?.description == "System: Error Domain=NSURLErrorDomain Code=-1009 \"(null)\"", error1?.description ?? "-")
XCTAssert(error1?.description == "System: The operation couldn’t be completed. (NSURLErrorDomain error -1009.)", error1?.description ?? "-")
XCTAssert(error1?.httpStatusCode == 400)

let errorURLResponse = HTTPURLResponse(url: URL(string: "http://google.com")!, statusCode: 400, httpVersion: nil, headerFields: nil)
Expand Down

0 comments on commit b25a975

Please sign in to comment.