소스 검색

Updated KingfisherOptionsInfoTests with diskStoreWriteOptions check

Vlad Z 4 년 전
부모
커밋
7c5d916d1e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      Tests/KingfisherTests/KingfisherOptionsInfoTests.swift

+ 3 - 0
Tests/KingfisherTests/KingfisherOptionsInfoTests.swift

@@ -52,6 +52,7 @@ class KingfisherOptionsInfoTests: XCTestCase {
         XCTAssertFalse(options.keepCurrentImageWhileLoading)
         XCTAssertFalse(options.onlyLoadFirstFrame)
         XCTAssertFalse(options.cacheOriginalImage)
+        XCTAssertEqual(options.diskStoreWriteOptions, [])
     }
     
     func testSetOptionsShouldParseCorrectly() {
@@ -89,6 +90,7 @@ class KingfisherOptionsInfoTests: XCTestCase {
             .keepCurrentImageWhileLoading,
             .onlyLoadFirstFrame,
             .cacheOriginalImage,
+            .diskStoreWriteOptions([.atomic]),
             .alternativeSources([alternativeSource]),
             .retryStrategy(DelayRetryStrategy(maxRetryCount: 10))
         ])
@@ -126,6 +128,7 @@ class KingfisherOptionsInfoTests: XCTestCase {
         XCTAssertTrue(options.keepCurrentImageWhileLoading)
         XCTAssertTrue(options.onlyLoadFirstFrame)
         XCTAssertTrue(options.cacheOriginalImage)
+        XCTAssertEqual(options.diskStoreWriteOptions, [Data.WritingOptions.atomic])
         XCTAssertEqual(options.alternativeSources?.count, 1)
         XCTAssertEqual(options.alternativeSources?.first?.url, alternativeSource.url)