You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
585 B

4 years ago
  1. package controller
  2. import org.scalatestplus.play.{BaseOneAppPerSuite, PlaySpec}
  3. import play.api.test.FakeRequest
  4. import play.api.test.Helpers._
  5. /**
  6. * Runs a functional test with the application, using an in memory
  7. * database. Migrations are handled automatically by play-flyway
  8. */
  9. class FunctionalSpec extends PlaySpec with BaseOneAppPerSuite with MyApplicationFactory {
  10. "HomeController" should {
  11. "work with in memory h2 database" in {
  12. val future = route(app, FakeRequest(GET, "/")).get
  13. contentAsString(future) must include("myuser@example.com")
  14. }
  15. }
  16. }