Updated the tests
This commit is contained in:
parent
d1f7694004
commit
b059b04fd2
|
@ -100,7 +100,7 @@ NSString *kImageTestKey = @"TestImageKey.jpg";
|
|||
//- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock;
|
||||
UIImage *imageForTesting = [self imageForTesting];
|
||||
[self.sharedImageCache storeImage:imageForTesting forKey:kImageTestKey];
|
||||
NSOperation *operation = [self.sharedImageCache queryDiskCacheForKey:kImageTestKey done:^(UIImage *image, SDImageCacheType cacheType) {
|
||||
NSOperation *operation = [self.sharedImageCache queryDiskCacheForKey:kImageTestKey done:^(UIImage *image, NSData *data, SDImageCacheType cacheType) {
|
||||
expect(image).to.equal(imageForTesting);
|
||||
}];
|
||||
expect(operation).toNot.beNil;
|
||||
|
|
|
@ -40,7 +40,10 @@ static int64_t kAsyncTestTimeout = 5;
|
|||
|
||||
NSURL *originalImageURL = [NSURL URLWithString:@"http://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage000.jpg"];
|
||||
|
||||
[[SDWebImageManager sharedManager] loadImageWithURL:originalImageURL options:SDWebImageRefreshCached progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
|
||||
[[SDWebImageManager sharedManager] loadImageWithURL:originalImageURL
|
||||
options:SDWebImageRefreshCached
|
||||
progress:nil
|
||||
completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
|
||||
expect(image).toNot.beNil();
|
||||
expect(error).to.beNil();
|
||||
expect(originalImageURL).to.equal(imageURL);
|
||||
|
@ -57,7 +60,10 @@ static int64_t kAsyncTestTimeout = 5;
|
|||
|
||||
NSURL *originalImageURL = [NSURL URLWithString:@"http://static2.dmcdn.net/static/video/656/177/44771656:jpeg_preview_small.png"];
|
||||
|
||||
[[SDWebImageManager sharedManager] loadImageWithURL:originalImageURL options:SDWebImageRefreshCached progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
|
||||
[[SDWebImageManager sharedManager] loadImageWithURL:originalImageURL
|
||||
options:SDWebImageRefreshCached
|
||||
progress:nil
|
||||
completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
|
||||
expect(image).to.beNil();
|
||||
expect(error).toNot.beNil();
|
||||
expect(originalImageURL).to.equal(imageURL);
|
||||
|
|
Loading…
Reference in New Issue