Ben Copsey

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

…pletely unrelated domain redirect
@@ -35,4 +35,5 @@ @@ -35,4 +35,5 @@
35 - (void)testSSL; 35 - (void)testSSL;
36 - (void)testRedirectPreservesSession; 36 - (void)testRedirectPreservesSession;
37 - (void)testTooMuchRedirection; 37 - (void)testTooMuchRedirection;
  38 +- (void)testRedirectToNewDomain;
38 @end 39 @end
@@ -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