Skip to content

Commit

Permalink
Fix the test case testFLAnimatedImageViewSetImageWithURL because of r…
Browse files Browse the repository at this point in the history
…emote resource is not available
  • Loading branch information
dreampiggy committed Aug 16, 2018
1 parent 205e376 commit 50b6a09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Tests/SDCategoriesTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ - (void)testFLAnimatedImageViewSetImageWithURL {
XCTestExpectation *expectation = [self expectationWithDescription:@"FLAnimatedImageView setImageWithURL"];

FLAnimatedImageView *imageView = [[FLAnimatedImageView alloc] init];
NSURL *originalImageURL = [NSURL URLWithString:@"https://www.interntheory.com/img/loading-small.gif"];
NSURL *originalImageURL = [NSURL URLWithString:kTestGIFURL];

[imageView sd_setImageWithURL:originalImageURL
completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
Expand Down
2 changes: 2 additions & 0 deletions Tests/Tests/SDTestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ FOUNDATION_EXPORT const int64_t kAsyncTestTimeout;
FOUNDATION_EXPORT const int64_t kMinDelayNanosecond;
FOUNDATION_EXPORT NSString * _Nonnull const kTestJpegURL;
FOUNDATION_EXPORT NSString * _Nonnull const kTestPNGURL;
FOUNDATION_EXPORT NSString * _Nonnull const kTestGIFURL;
FOUNDATION_EXPORT NSString * _Nonnull const kTestWebPURL;

@interface SDTestCase : XCTestCase

Expand Down
2 changes: 2 additions & 0 deletions Tests/Tests/SDTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
const int64_t kMinDelayNanosecond = NSEC_PER_MSEC * 100; // 0.1s
NSString *const kTestJpegURL = @"http://via.placeholder.com/50x50.jpg";
NSString *const kTestPNGURL = @"http://via.placeholder.com/50x50.png";
NSString *const kTestGIFURL = @"https://media.giphy.com/media/UEsrLdv7ugRTq/giphy.gif";
NSString *const kTestWebPURL = @"http://littlesvr.ca/apng/images/SteamEngine.webp";

@implementation SDTestCase

Expand Down

0 comments on commit 50b6a09

Please sign in to comment.