Skip to content

Commit

Permalink
Add some test for SDWebImageFIRStorageLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
dreampiggy committed Mar 29, 2019
1 parent c3e7796 commit e13a74e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Storage/FirebaseStorageUITests/FUIImageViewCategoryTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,24 @@ - (void)testItCancelsTheCurrentDownloadWhenSettingAnImage {
OCMVerify([download cancel]);
}

- (void)testLoaderWithNilStorageReference {
[SDWebImageFIRStorageLoader.sharedLoader loadImageWithURL:nil
options:0
context:nil
progress:nil
completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
XCTAssertNil(image);
XCTAssertNotNil(error);
}];
NSURL *httpURL = [NSURL URLWithString:@"www.google.com"];
[SDWebImageFIRStorageLoader.sharedLoader loadImageWithURL:httpURL
options:0
context:nil
progress:nil
completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
XCTAssertNil(image);
XCTAssertNotNil(error);
}];
}

@end

0 comments on commit e13a74e

Please sign in to comment.