Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created November 13, 2017 03:26
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/37d772b81c62bae16c82bb13b9ed0f7a to your computer and use it in GitHub Desktop.
Save koromiko/37d772b81c62bae16c82bb13b9ed0f7a to your computer and use it in GitHub Desktop.
func test_fetch_photo_fail() {
// Given a failed fetch with a certain failure
let error = APIError.permissionDenied
// When
sut.initFetch()
mockAPIService.fetchFail(error: error )
// 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