Skip to content

Instantly share code, notes, and snippets.

@jeffreyolchovy
Created May 16, 2017 11:01
Show Gist options
  • Select an option

  • Save jeffreyolchovy/2901dfe3432a8ec04d873ddcc3ad5057 to your computer and use it in GitHub Desktop.

Select an option

Save jeffreyolchovy/2901dfe3432a8ec04d873ddcc3ad5057 to your computer and use it in GitHub Desktop.
package com.example.sbt
import scala.util.Failure
import org.scalatest.{FlatSpec, Matchers}
class TweeterServiceSpec extends FlatSpec with Matchers {
behavior of "TweeterService"
it should "return a failure when acting on behalf of a client with bogus credentials" in {
val service = TweeterService("foo", "bar", "baz", "qux")
val result = service.post("This tweet should never make it out!")
result shouldBe a[Failure[_]]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment