Created
September 7, 2017 02:19
-
-
Save koromiko/4bfaca743323ee0b364b65545ad95d62 to your computer and use it in GitHub Desktop.
This file contains 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_save() { | |
//Give a todo item | |
let name = "Todo1" | |
let finished = false | |
let expect = expectation(description: "Context Saved") | |
waitForSavedNotification { (notification) in | |
expect.fulfill() | |
} | |
_ = sut.insertTodoItem(name: name, finished: finished) | |
//When save | |
sut.save() | |
//Assert save is called via notification (wait) | |
waitForExpectations(timeout: 1, handler: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment