Add cacheType checking in animatedImageView category

This commit is contained in:
kinarob 2019-05-06 11:33:26 +08:00
parent bf047b6e1b
commit 430bebe274
1 changed files with 2 additions and 0 deletions

View File

@ -259,6 +259,7 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
expect(error).to.beNil();
expect(image).notTo.beNil();
expect([image isKindOfClass:[SDAnimatedImage class]]).beTruthy();
expect(cacheType).equal(SDImageCacheTypeNone);
[expectation fulfill];
}];
[self waitForExpectationsWithCommonTimeout];
@ -272,6 +273,7 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
[imageView sd_setImageWithURL:testURL placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
expect(error).to.beNil();
expect(image).notTo.beNil();
expect(cacheType).equal(SDImageCacheTypeDisk);
expect([image isKindOfClass:[SDAnimatedImage class]]).beTruthy();
[expectation fulfill];
}];