Skip to content

Commit 703c333

Browse files
committed
Fix testTimeout to support new RequestError implementation
1 parent 6749d75 commit 703c333

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Tests/.DS_Store

6 KB
Binary file not shown.

Tests/RequestTests/RequestTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,8 @@ final class RequestTests: XCTestCase {
355355
Timeout(1, for: .all)
356356
}
357357
.onError { error in
358-
if let err = error.error, let msg = String(data: err, encoding: .utf8) {
359-
if msg == "The request timed out." {
360-
expectation.fulfill()
361-
}
358+
if error.localizedDescription == "The request timed out." {
359+
expectation.fulfill()
362360
}
363361
}
364362
.call()

0 commit comments

Comments
 (0)