From d4e6d070687a55f5621459babb8e6dbc5991e52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20August=C3=BDn?= Date: Fri, 23 Jul 2021 11:25:05 +0200 Subject: [PATCH] chore(deps): http4s 0.22.0 --- .../avast/grpc/jsonbridge/http4s/Http4sTest.scala | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/http4s/src/test/scala/com/avast/grpc/jsonbridge/http4s/Http4sTest.scala b/http4s/src/test/scala/com/avast/grpc/jsonbridge/http4s/Http4sTest.scala index 32f8ce00..be657430 100644 --- a/http4s/src/test/scala/com/avast/grpc/jsonbridge/http4s/Http4sTest.scala +++ b/http4s/src/test/scala/com/avast/grpc/jsonbridge/http4s/Http4sTest.scala @@ -8,6 +8,7 @@ import org.http4s.headers.{`Content-Length`, `Content-Type`} import org.http4s.{Charset, Header, Headers, MediaType, Method, Request, Uri} import org.scalatest.concurrent.ScalaFutures import org.scalatest.funsuite.AnyFunSuite +import org.typelevel.ci.CIString import scala.concurrent.ExecutionContext import scala.concurrent.ExecutionContext.Implicits.global @@ -41,11 +42,7 @@ class Http4sTest extends AnyFunSuite with ScalaFutures { assertResult("""{"sum":3}""")(response.as[String].unsafeRunSync()) - assertResult( - Headers.of( - `Content-Type`(MediaType.application.json), - `Content-Length`.fromLong(9).getOrElse(fail()) - ) + assertResult(Headers(`Content-Type`(MediaType.application.json), `Content-Length`(9)) )(response.headers) } @@ -65,11 +62,7 @@ class Http4sTest extends AnyFunSuite with ScalaFutures { assertResult("""{"sum":3}""")(response.as[String].unsafeRunSync()) - assertResult( - Headers.of( - `Content-Type`(MediaType.application.json), - `Content-Length`.fromLong(9).getOrElse(fail()) - ) + assertResult(Headers(`Content-Type`(MediaType.application.json), `Content-Length`(9)) )(response.headers) } @@ -159,7 +152,7 @@ class Http4sTest extends AnyFunSuite with ScalaFutures { Request[IO]( method = Method.POST, uri = Uri.fromString("com.avast.grpc.jsonbridge.test.TestService/Add").getOrElse(fail()), - headers = Headers.of(Header(TestServiceImpl.HeaderName, headerValue)) + headers = Headers(Header.Raw(CIString(TestServiceImpl.HeaderName), headerValue)) ).withEntity(""" { "a": 1, "b": 2} """) .withContentType(`Content-Type`(MediaType.application.json)) )