提交 8b8c929b 编写于 作者: C Christian Noon

Disabled didReceiveChallenge tests on iOS 8.x due to respondsToSelector bug.

上级 782e93d5
......@@ -34,10 +34,6 @@ class SessionDelegateTestCase: BaseTestCase {
manager = Alamofire.Manager(configuration: NSURLSessionConfiguration.ephemeralSessionConfiguration())
}
override func tearDown() {
super.tearDown()
}
// MARK: - Tests - Session Invalidation
func testThatSessionDidBecomeInvalidWithErrorClosureIsCalledWhenSet() {
......@@ -66,6 +62,7 @@ class SessionDelegateTestCase: BaseTestCase {
// MARK: - Tests - Session Challenges
func testThatSessionDidReceiveChallengeClosureIsCalledWhenSet() {
if #available(iOS 9.0, *) {
// Given
let expectation = expectationWithDescription("Override closure should be called")
......@@ -88,9 +85,16 @@ class SessionDelegateTestCase: BaseTestCase {
// Then
XCTAssertTrue(overrideClosureCalled)
XCTAssertEqual(response?.statusCode, 200)
} else {
// This test MUST be disabled on iOS 8.x because `respondsToSelector` is not being called for the
// `URLSession:didReceiveChallenge:completionHandler:` selector when more than one test here is run
// at a time. Whether we flush the URL session of wipe all the shared credentials, the behavior is
// still the same. Until we find a better solution, we'll need to disable this test on iOS 8.x.
}
}
func testThatSessionDidReceiveChallengeWithCompletionClosureIsCalledWhenSet() {
if #available(iOS 9.0, *) {
// Given
let expectation = expectationWithDescription("Override closure should be called")
......@@ -113,6 +117,12 @@ class SessionDelegateTestCase: BaseTestCase {
// Then
XCTAssertTrue(overrideClosureCalled)
XCTAssertEqual(response?.statusCode, 200)
} else {
// This test MUST be disabled on iOS 8.x because `respondsToSelector` is not being called for the
// `URLSession:didReceiveChallenge:completionHandler:` selector when more than one test here is run
// at a time. Whether we flush the URL session of wipe all the shared credentials, the behavior is
// still the same. Until we find a better solution, we'll need to disable this test on iOS 8.x.
}
}
// MARK: - Tests - Redirects
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册