Browse Source

Clear cache when starting

onevcat 10 years ago
parent
commit
879197c2b3

+ 1 - 0
KingfisherTests/ImageCacheTests.swift

@@ -40,6 +40,7 @@ class ImageCacheTests: XCTestCase {
         super.setUp()
         // Put setup code here. This method is called before the invocation of each test method in the class.
         cache = ImageCache(name: "test")
+        clearCaches([cache])
     }
     
     override func tearDown() {

+ 1 - 0
KingfisherTests/UIButtonExtensionTests.swift

@@ -47,6 +47,7 @@ class UIButtonExtensionTests: XCTestCase {
         // Put setup code here. This method is called before the invocation of each test method in the class.
         button = UIButton()
         KingfisherManager.sharedManager.downloader = ImageDownloader(name: "testDownloader")
+        cleanDefaultCache()
     }
     
     override func tearDown() {

+ 1 - 0
KingfisherTests/UIImageViewExtensionTests.swift

@@ -47,6 +47,7 @@ class UIImageViewExtensionTests: XCTestCase {
         // Put setup code here. This method is called before the invocation of each test method in the class.
         imageView = UIImageView()
         KingfisherManager.sharedManager.downloader = ImageDownloader(name: "testDownloader")
+        cleanDefaultCache()
     }
     
     override func tearDown() {