From b25a9750f8293b3cb3a796a48a552571b927d211 Mon Sep 17 00:00:00 2001 From: Simon McLoughlin Date: Fri, 10 Nov 2023 16:31:05 +0000 Subject: [PATCH] fix tests --- .../Services/ErrorHandlingServiceTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/KukaiCoreSwiftTests/Services/ErrorHandlingServiceTests.swift b/Tests/KukaiCoreSwiftTests/Services/ErrorHandlingServiceTests.swift index 356e48b4..caf5625f 100644 --- a/Tests/KukaiCoreSwiftTests/Services/ErrorHandlingServiceTests.swift +++ b/Tests/KukaiCoreSwiftTests/Services/ErrorHandlingServiceTests.swift @@ -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) @@ -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)