Skip to content

Commit 6e2d2cb

Browse files
committed
Update tests to iOS 12
1 parent 543e53f commit 6e2d2cb

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

RxHttpClientTests/HttpClientBasicTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,10 @@ class HttpClientBasicTests: XCTestCase {
255255

256256
func testCreateHttpClientWithCorrectConfiguration() {
257257
let config = URLSessionConfiguration.default
258+
XCTAssertNotEqual(config.httpCookieAcceptPolicy, .always)
258259
config.httpCookieAcceptPolicy = .always
259260
let client = HttpClient(sessionConfiguration: config)
260-
XCTAssertEqual(config, client.urlSession.configuration)
261+
XCTAssertEqual(config.httpCookieAcceptPolicy, client.urlSession.configuration.httpCookieAcceptPolicy)
261262
}
262263

263264
func testCreateHttpClientWithCorrectUrlSession() {

RxHttpClientTests/HttpClientCachingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class HttpClientCachingTests: XCTestCase {
99

1010
override func setUp() {
1111
cacheDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(UUID().uuidString)
12-
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: false, attributes: nil)
12+
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: true, attributes: nil)
1313
client = HttpClient(urlRequestCacheProvider: UrlRequestFileSystemCacheProvider(cacheDirectory: cacheDirectory))
1414
}
1515

RxHttpClientTests/HttpRequestFileSystemCacheProviderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class HttpRequestFileSystemCacheProviderTests: XCTestCase {
2020
var cacheDirectory: URL!
2121
override func setUp() {
2222
cacheDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(UUID().uuidString)
23-
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: false, attributes: nil)
23+
try! FileManager.default.createDirectory(atPath: cacheDirectory.path, withIntermediateDirectories: true, attributes: nil)
2424
}
2525

2626
override func tearDown() {

RxHttpClientTests/MemoryCacheProviderTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class MemoryCacheProviderTests: XCTestCase {
206206

207207
func testSaveDataToSpecificDir() {
208208
let dir = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(UUID().uuidString)
209-
try! FileManager.default.createDirectory(at: dir, withIntermediateDirectories: false, attributes: nil)
209+
try! FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true, attributes: nil)
210210
let provider = MemoryDataCacheProvider(uid: "test")
211211
let testData = "Some test data string".data(using: String.Encoding.utf8)!
212212
provider.append(data: testData)

0 commit comments

Comments
 (0)