Created
May 30, 2015 19:36
-
-
Save yareally/6d86ae6cf7cd123fb1d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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