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 1043b0c commit 9de86ff
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 @@ -113,4 +113,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 9de86ff

Please sign in to comment.