Created
March 31, 2019 17:58
-
-
Save polac24/93bb41a09fec38e0b99337d011778236 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 testAddingUser_savesToDatabase () { | |
// Arrange | |
var addedUser: String? | |
database.addUserAction = { name in | |
addedUser = name | |
return false | |
} | |
// Act | |
... | |
// Assert | |
XCTAssertEqual(addedUser, "myuser") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment