Skip to content

Commit 3257ea2

Browse files
committed
Fix iOS unit test again
1 parent 503f047 commit 3257ea2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/Tests/SDAnimatedImageTest.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ - (void)test22AnimatedImageViewCategory {
316316
NSURL *testURL = [NSURL URLWithString:@"https://media.giphy.com/media/3oeji6siihbdrxxi40/giphy.gif"];
317317
[SDImageCache.sharedImageCache removeImageFromMemoryForKey:testURL.absoluteString];
318318
[SDImageCache.sharedImageCache removeImageFromDiskForKey:testURL.absoluteString];
319-
[imageView sd_setImageWithURL:testURL completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
319+
// I don't know why, but `fromLoaderOnly` is need for iOS Unit Test on GitHub Action
320+
[imageView sd_setImageWithURL:testURL placeholderImage:nil options:SDWebImageFromLoaderOnly completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
320321
expect(error).to.beNil();
321322
expect(image).notTo.beNil();
322323
expect([image isKindOfClass:[SDAnimatedImage class]]).beTruthy();

0 commit comments

Comments
 (0)