Skip to content

Instantly share code, notes, and snippets.

@normand1
Last active September 3, 2019 17:27
Show Gist options
  • Save normand1/c6890b85f9ff1a6fab41288caa9aaeb6 to your computer and use it in GitHub Desktop.
Save normand1/c6890b85f9ff1a6fab41288caa9aaeb6 to your computer and use it in GitHub Desktop.
testInteractorLocationValueChangedUpdatesCityParamsWithValueFromTexField
func testInteractorLocationValueChangedUpdatesCityParamsWithValueFromTexField() {
// Arrange
mockVC.stubbedViewModel.locationType = .city
textField.text = "NEW CITY"
// Act
interactor.locationValueChanged(sender: textField, viewController: mockVC)
//Assert
XCTAssert(mockVC.invokedOpenWeatherRequestParamsSetter)
XCTAssertEqual(mockVC.invokedOpenWeatherRequestParamsList.first?.city, "NEW CITY")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment