Explorar o código

Update the test case to ensure thi silly problem will not occur again :)

DreamPiggy %!s(int64=6) %!d(string=hai) anos
pai
achega
974c3ff4ad
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Tests/Tests/SDWebImageDownloaderTests.m

+ 4 - 0
Tests/Tests/SDWebImageDownloaderTests.m

@@ -95,6 +95,10 @@
     operation = token.downloadOperation;
     expect([operation class]).to.equal([SDWebImageTestDownloadOperation class]);
     
+    // Assert the NSOperation conforms to `SDWebImageOperation`
+    expect([NSOperation.class conformsToProtocol:@protocol(SDWebImageOperation)]).beTruthy();
+    expect([operation conformsToProtocol:@protocol(SDWebImageOperation)]).beTruthy();
+    
     // back to the original value
     downloader.config.operationClass = nil;
     token = [downloader downloadImageWithURL:imageURL3 options:0 progress:nil completed:nil];