Skip to content

Instantly share code, notes, and snippets.

@dougritter
Last active September 11, 2019 17:22
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 dougritter/793764b8e72070a1c1f995b29eec0e9b to your computer and use it in GitHub Desktop.
Save dougritter/793764b8e72070a1c1f995b29eec0e9b to your computer and use it in GitHub Desktop.
AccountPresenter tests with router.
class AccountPresenterTests: XCTestCase {
func test_given_and_account_name_when_next_is_pressed_then_should_navigate_to_home() {
let routerMock = RouterMock()
let presenter = AccountPresenterImplementation(router: routerMock)
presenter.nextPressed(accountName: "talkdesk")
XCTAssertEqual(routerMock.showHomeCalled, true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment