Skip to content

Commit 1f26d48

Browse files
Remove unneeded test.
1 parent 290c61b commit 1f26d48

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

tests/unit-tests/AuthTests.swift

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -753,61 +753,6 @@ class AuthTests: XCTestCase {
753753
wait(for: [condition1], timeout: testExpectationTimeoutForInverted)
754754
}
755755

756-
func testA() throws {
757-
758-
let expectation1 = expectation(description: #function)
759-
760-
var callNumber = 0
761-
let authDelegate = createAuthDelegate {
762-
callNumber += 1
763-
if callNumber == 1 {
764-
return nil
765-
} else {
766-
return "some-auth-token"
767-
}
768-
}
769-
770-
let config = IterableConfig()
771-
config.authDelegate = authDelegate
772-
773-
let networkSession = MockJwtResponseNetworkSession()
774-
775-
let api = InternalIterableAPI.initializeForTesting(
776-
config: config,
777-
networkSession: networkSession
778-
)
779-
api.userId = "some-user-id"
780-
api.track("some-event").onSuccess { _ in
781-
print("success")
782-
expectation1.fulfill()
783-
}.onError { error in
784-
print("error, \(error)")
785-
expectation1.fulfill()
786-
}
787-
wait(for: [expectation1], timeout: testExpectationTimeout)
788-
789-
class MockJwtResponseNetworkSession: NetworkSessionProtocol {
790-
var callNumber = 0
791-
func makeRequest(_ request: URLRequest, completionHandler: @escaping CompletionHandler) {
792-
callNumber += 1
793-
let data = callNumber == 1 ? [JsonKey.Response.iterableCode: JsonValue.Code.invalidJwtPayload].toJsonData() : nil
794-
let response = HTTPURLResponse(url: request.url!,
795-
statusCode: callNumber == 1 ? 401 : 200,
796-
httpVersion: "HTTP/1.1",
797-
headerFields: [:])
798-
completionHandler(data, response, nil)
799-
}
800-
801-
func makeDataRequest(with url: URL, completionHandler: @escaping CompletionHandler) {
802-
fatalError()
803-
}
804-
805-
func createDataTask(with url: URL, completionHandler: @escaping CompletionHandler) -> DataTaskProtocol {
806-
fatalError()
807-
}
808-
}
809-
}
810-
811756
// MARK: - Private
812757

813758
class DefaultAuthDelegate: IterableAuthDelegate {

0 commit comments

Comments
 (0)