Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created November 13, 2017 03:32
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 koromiko/1e145c3409b158f4fea4a174a789f64b to your computer and use it in GitHub Desktop.
Save koromiko/1e145c3409b158f4fea4a174a789f64b to your computer and use it in GitHub Desktop.
func test_user_press_for_sale_item() {
let indexPath = IndexPath(row: 0, section: 0)
//Given some photo stubs
mockAPIService.completePhotos = StubGenerator().stubPhotos()
sut.initFetch() // Fetch stubs
mockAPIService.fetchSuccess()
//When User press a specific cell (a for sale photo stub)
sut.userPressed( at: indexPath )
//Assert
XCTAssertTrue( sut.isAllowSegue )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment