Skip to content

Commit 05a70dd

Browse files
author
Christian Elies
committed
test(): implemented another default remote image cache test
1 parent 3b23c34 commit 05a70dd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Tests/RemoteImageTests/Services/DefaultRemoteImageCacheTests.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ final class DefaultRemoteImageCacheTests: XCTestCase {
2222
XCTAssertEqual(remoteImageCache.object(forKey: key), image)
2323
}
2424

25+
func testRemoveImage() {
26+
let key = "Test" as NSString
27+
let image = PlatformSpecificImageType()
28+
remoteImageCache.setObject(image, forKey: key)
29+
XCTAssertEqual(remoteImageCache.object(forKey: key), image)
30+
remoteImageCache.removeObject(forKey: key)
31+
XCTAssertNil(remoteImageCache.object(forKey: key))
32+
}
33+
2534
static var allTests = [
26-
("testSetImage", testSetImage)
35+
("testSetImage", testSetImage),
36+
("testRemoveImage", testRemoveImage)
2737
]
2838
}

0 commit comments

Comments
 (0)