Skip to content

Instantly share code, notes, and snippets.

@vichu
Last active November 22, 2018 23:44
Show Gist options
  • Save vichu/33a840899671bba4b4fd42e4b9deb4de to your computer and use it in GitHub Desktop.
Save vichu/33a840899671bba4b4fd42e4b9deb4de to your computer and use it in GitHub Desktop.
class NetworkCallExampleTest extends AsyncFlatSpec {
it should "verify the future returns with for and yield" in {
val networkCallExample = new NetworkCallExample
for{
res <- networkCallExample.lengthOfTheResponse("testurl")
} yield {
assert(res == 10)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment