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.

25 lines
713 B

3 years ago
  1. package wow.doge.http4sdemo
  2. import cats.effect.IO
  3. import org.http4s._
  4. import org.http4s.implicits._
  5. import munit.CatsEffectSuite
  6. class HelloWorldSpec extends CatsEffectSuite {
  7. // test("HelloWorld returns status code 200") {
  8. // assertIO(retHelloWorld.map(_.status), Status.Ok)
  9. // }
  10. // test("HelloWorld returns hello world message") {
  11. // assertIO(
  12. // retHelloWorld.flatMap(_.as[String]),
  13. // "{\"message\":\"Hello, world\"}"
  14. // )
  15. // }
  16. // private[this] val retHelloWorld: IO[Response[IO]] = {
  17. // val getHW = Request[IO](Method.GET, uri"/hello/world")
  18. // val helloWorld = HelloWorld.impl[IO]
  19. // Http4sdemoRoutes.helloWorldRoutes(helloWorld).orNotFound(getHW)
  20. // }
  21. }