Ver Fonte

Fixed up issue in the URLProtocol tests that has been tripping false positives.

Christian Noon há 10 anos atrás
pai
commit
6f8d8e176f
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      Tests/URLProtocolTests.swift

+ 2 - 2
Tests/URLProtocolTests.swift

@@ -126,7 +126,7 @@ class URLProtocolTestCase: BaseTestCase {
         // Given
         let URLString = "https://httpbin.org/response-headers"
         let URL = NSURL(string: URLString)!
-        let parameters = ["URLRequest-Header": "foobar"]
+        let parameters = ["request-header": "foobar"]
 
         let mutableURLRequest = NSMutableURLRequest(URL: URL)
         mutableURLRequest.HTTPMethod = Method.GET.rawValue
@@ -160,7 +160,7 @@ class URLProtocolTestCase: BaseTestCase {
         XCTAssertNil(error, "error should be nil")
 
         if let headers = response?.allHeaderFields as? [String: String] {
-            XCTAssertEqual(headers["URLRequest-Header"] ?? "", "foobar", "urlrequest-header should be foobar")
+            XCTAssertEqual(headers["request-header"] ?? "", "foobar", "urlrequest-header should be foobar")
             XCTAssertNil(headers["Session-Configuration-Header"], "Session-Configuration-Header should be nil")
         } else {
             XCTFail("headers should not be nil")