Skip to content

Instantly share code, notes, and snippets.

@yareally
Created May 30, 2015 19:36
Show Gist options
  • Save yareally/6d86ae6cf7cd123fb1d0 to your computer and use it in GitHub Desktop.
Save yareally/6d86ae6cf7cd123fb1d0 to your computer and use it in GitHub Desktop.
@RunWith(classOf[JUnitRunner])
class ApplicationSpec extends Specification {
"Application" should {
"send 404 on a bad request" in new WithApplication{
route(FakeRequest(GET, "/boum")) must beNone
}
"render the index page" in new WithApplication{
val home = route(FakeRequest(GET, "/")).get
status(home) must equalTo(OK)
contentType(home) must beSome.which(_ == "text/html")
contentAsString(home) must contain ("Your new application is ready.")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment