Last active
August 15, 2020 20:56
-
-
Save victorpanitz/043342523d3f68019c256edf27238baa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func test_cancellAllTasks_givenExistsActiveTasks_shouldCancellAllOfThem() { | |
... | |
let getTasksExpectation = XCTestExpectation(description: "getTasksExpectation") | |
var activeTasksCount: Int? | |
sut.session.getAllTasks { tasks in | |
activeTasksCount = tasks.count | |
getTasksExpectation.fulfill() | |
} | |
wait(for: [getTasksExpectation], timeout: 0.2) | |
XCTAssertEqual(activeTasksCount, 2) | |
sut.cancelAllTasks() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment