Skip to content

Instantly share code, notes, and snippets.

@dmlebron
Created April 20, 2018 02:09
Show Gist options
  • Save dmlebron/b4a89b5b679acbd8bcb5515ca5ee472d to your computer and use it in GitHub Desktop.
Save dmlebron/b4a89b5b679acbd8bcb5515ca5ee472d to your computer and use it in GitHub Desktop.
func testFetchJobsAroundPostalCode() {
let viewModel = MainViewModel(locationServiceType: stubService, apiClientType: stubService, addressCompletion: { address in
expect(address).to(equal(DummyData.Location.fullAddress))
})
viewModel.fetchJobsAround(postalCode: DummyData.Location.postalCode) { (response) in
let responseTitle = response!.first!["title"] as! String
expect(responseTitle).to(equal(DummyData.Api.response["title"]))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment