Skip to content

Instantly share code, notes, and snippets.

@dineshba
Last active May 5, 2018 03:48
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 dineshba/0dfee3c8f860f019aa782141ad70e2a9 to your computer and use it in GitHub Desktop.
Save dineshba/0dfee3c8f860f019aa782141ad70e2a9 to your computer and use it in GitHub Desktop.
func test_fetch_photo_fail() {
// Given a failed fetch with a certain failure
mockAPIService.error = APIError.permissionDenied
// When
sut.initFetch()
// Sut should display predefined error message
XCTAssertEqual( sut.alertMessage, error.rawValue )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment