Added new test to ensure that URLWithString:relativeToURL: is working with a com…
…pletely unrelated domain redirect
Showing
2 changed files
with
9 additions
and
0 deletions
| @@ -659,4 +659,12 @@ | @@ -659,4 +659,12 @@ | ||
| 659 | GHAssertTrue(success,@"Generated the wrong error for a redirection loop"); | 659 | GHAssertTrue(success,@"Generated the wrong error for a redirection loop"); |
| 660 | } | 660 | } |
| 661 | 661 | ||
| 662 | +- (void)testRedirectToNewDomain | ||
| 663 | +{ | ||
| 664 | + ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"]]; | ||
| 665 | + [request start]; | ||
| 666 | + BOOL success = [[[request url] absoluteString] isEqualTo:@"http://www.apple.com/"]; | ||
| 667 | + GHAssertTrue(success,@"Failed to redirect to a different domain"); | ||
| 668 | +} | ||
| 669 | + | ||
| 662 | @end | 670 | @end |
-
Please register or login to post a comment