Browse Source

Added response status code asssertions for redirect tests.

Christian Noon 10 years ago
parent
commit
7d644e07ca
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Tests/ResponseTests.swift

+ 2 - 0
Tests/ResponseTests.swift

@@ -88,6 +88,7 @@ class AlamofireRedirectResponseTestCase: XCTestCase {
                 XCTAssertNil(error, "error should be nil")
 
                 XCTAssertEqual(response!.URL!, NSURL(string: "http://www.google.com/")!, "request should have followed a redirect")
+                XCTAssertEqual(response!.statusCode, 200, "response should have a 200 status code")
 
                 expectation.fulfill()
         }
@@ -118,6 +119,7 @@ class AlamofireRedirectResponseTestCase: XCTestCase {
                 XCTAssertNil(error, "error should be nil")
 
                 XCTAssertEqual(response!.URL!, NSURL(string: URL)!, "request should not have followed a redirect")
+                XCTAssertEqual(response!.statusCode, 301, "response should have a 301 status code")
 
                 expectation.fulfill()
         }