Ben Copsey

Added new test to ensure that URLWithString:relativeToURL: is working with a com…

…pletely unrelated domain redirect
... ... @@ -35,4 +35,5 @@
- (void)testSSL;
- (void)testRedirectPreservesSession;
- (void)testTooMuchRedirection;
- (void)testRedirectToNewDomain;
@end
... ...
... ... @@ -659,4 +659,12 @@
GHAssertTrue(success,@"Generated the wrong error for a redirection loop");
}
- (void)testRedirectToNewDomain
{
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_to_new_domain"]];
[request start];
BOOL success = [[[request url] absoluteString] isEqualTo:@"http://www.apple.com/"];
GHAssertTrue(success,@"Failed to redirect to a different domain");
}
@end
... ...