Update the test from merge conflict

This commit is contained in:
DreamPiggy 2018-08-02 18:53:52 +08:00
parent 8b7e88de50
commit e400d220c5
1 changed files with 11 additions and 0 deletions

View File

@ -99,6 +99,17 @@
[downloader invalidateSessionAndCancel:YES];
}
- (void)test07ThatDownloadImageWithNilURLCallsCompletionWithNils {
XCTestExpectation *expectation = [self expectationWithDescription:@"Completion is called with nils"];
[[SDWebImageDownloader sharedDownloader] downloadImageWithURL:nil options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
expect(image).to.beNil();
expect(data).to.beNil();
expect(error.code).equal(SDWebImageErrorInvalidURL);
[expectation fulfill];
}];
[self waitForExpectationsWithCommonTimeout];
}
- (void)test08ThatAHTTPAuthDownloadWorks {
XCTestExpectation *expectation = [self expectationWithDescription:@"HTTP Auth download"];
SDWebImageDownloaderConfig *config = SDWebImageDownloaderConfig.defaultDownloaderConfig;