Skip to content

Instantly share code, notes, and snippets.

@mAu888
Last active February 21, 2016 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mAu888/78e665f70285ffc0ea20 to your computer and use it in GitHub Desktop.
Save mAu888/78e665f70285ffc0ea20 to your computer and use it in GitHub Desktop.
class ProfileViewModelTests: XCTestCase {
func testDelegateNotifiedWhenProfileDeleted() {
// given
let fakeClient = FakeAPIClient()
let delegate = FakeDelegate()
let viewModel = ProfileViewModel(apiClient: fakeClient, delegate: delegate)
// when
viewModel.deleteProfile()
// then
XCTAssert(delegate.didDeleteUser)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment