mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
Fix test breakage when your ISP returns a custom HTTP response page for an invalid host
This commit is contained in:
@@ -99,7 +99,9 @@
|
||||
[operationQueue addOperation:requestOperation];
|
||||
[operationQueue waitUntilAllOperationsAreFinished];
|
||||
|
||||
expect([requestOperation.error code]).to.equal(NSURLErrorCannotFindHost);
|
||||
// NOTE: If your ISP provides a redirect page for unknown hosts, you'll get a `NSURLErrorCannotDecodeContentData`
|
||||
NSArray *validErrorCodes = @[ @(NSURLErrorCannotDecodeContentData), @(NSURLErrorCannotFindHost) ];
|
||||
assertThat(validErrorCodes, hasItem(@([requestOperation.error code])));
|
||||
}
|
||||
- (void)testSendingAnObjectRequestOperationToAnBrokenURL
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user