소스 검색

Updated cache test check for no store header to use availability checks.

Christian Noon 9 년 전
부모
커밋
2ee092aeb3
1개의 변경된 파일6개의 추가작업 그리고 8개의 파일을 삭제
  1. 6 8
      Tests/CacheTests.swift

+ 6 - 8
Tests/CacheTests.swift

@@ -239,17 +239,15 @@ class CacheTestCase: BaseTestCase {
     // MARK: - Cache Helper Methods
 
     private func isCachedResponseForNoStoreHeaderExpected() -> Bool {
-        var storedInCache = false
-
         #if os(iOS)
-            let operatingSystemVersion = NSOperatingSystemVersion(majorVersion: 8, minorVersion: 3, patchVersion: 0)
-
-            if !NSProcessInfo().isOperatingSystemAtLeastVersion(operatingSystemVersion) {
-                storedInCache = true
+            if #available(iOS 8.3, *) {
+                return false
+            } else {
+                return true
             }
+        #else
+            return false
         #endif
-
-        return storedInCache
     }
 
     // MARK: - Tests