Sha256: 23d44cc69861993b7aff6fb9ed3dfc27c377cd0d20aa023b09930b724f7c0bae

Contents?: true

Size: 820 Bytes

Versions: 13

Compression:

Stored size: 820 Bytes

Contents

import org.specs2.mutable._
import org.specs2.runner._
import org.junit.runner._

import play.api.test._
import play.api.test.Helpers._

/**
 * Add your spec here.
 * You can mock out a whole application including requests, plugins etc.
 * For more information, consult the wiki.
 */
@RunWith(classOf[JUnitRunner])
class ApplicationSpec extends Specification {

  "Application" should {

    "send 404 on a bad request" in new WithApplication{
      route(FakeRequest(GET, "/boum")) must beSome.which (status(_) == NOT_FOUND)
    }

    "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.")
    }
  }
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
picsolve_docker_builder-0.5.5 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.5.4 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.5.3 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.5.2 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.5.1 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.5.0 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.4.0 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.3.2 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.3.1 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.3.0 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.2.0 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.1.1 integration/play_hello_world/test/ApplicationSpec.scala
picsolve_docker_builder-0.1.0 integration/play_hello_world/test/ApplicationSpec.scala