Skip to content

Commit c19d89d

Browse files
committed
modify a test to inspect properties of the received URLError
1 parent 7119419 commit c19d89d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tests/Foundation/Tests/TestURLSession.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,9 @@ class TestURLSession: LoopbackServerTest {
14431443
XCTAssertNotNil(error as? URLError)
14441444
if let urlError = error as? URLError {
14451445
XCTAssertEqual(urlError._nsError.code, NSURLErrorCancelled)
1446+
XCTAssertEqual(urlError.failingURL, URL(string: urlString)!)
1447+
XCTAssertEqual(urlError.failureURLString, urlString)
1448+
XCTAssertEqual(urlError.localizedDescription, "cancelled")
14461449
}
14471450

14481451
expect.fulfill()

0 commit comments

Comments
 (0)