diff --git a/core/jvm/src/test/scala/krop/route/PathUnparseSuite.scala b/core/jvm/src/test/scala/krop/route/PathUnparseSuite.scala index 1508583..a5b72d1 100644 --- a/core/jvm/src/test/scala/krop/route/PathUnparseSuite.scala +++ b/core/jvm/src/test/scala/krop/route/PathUnparseSuite.scala @@ -42,7 +42,7 @@ class PathUnparseSuite extends FunSuite { ) } - test("Non-capturing all path unparses to expected Uri"){ + test("Non-capturing all path unparses to expected Uri") { assertEquals( nonCapturingAllPath.unparse(EmptyTuple), Uri(path = (Uri.Path.Root / "assets" / "html").addEndsWithSlash) diff --git a/core/jvm/src/test/scala/krop/route/RequestEntitySuite.scala b/core/jvm/src/test/scala/krop/route/RequestEntitySuite.scala index 3069326..1b58eee 100644 --- a/core/jvm/src/test/scala/krop/route/RequestEntitySuite.scala +++ b/core/jvm/src/test/scala/krop/route/RequestEntitySuite.scala @@ -21,8 +21,8 @@ import munit.CatsEffectSuite import org.http4s.Method import org.http4s.Uri import org.http4s.implicits.* -import org.http4s.{Request as Http4sRequest} import org.http4s.{Entity as Http4sEntity} +import org.http4s.{Request as Http4sRequest} class RequestEntitySuite extends CatsEffectSuite { val unitRequest = Request.get(Path.root).withEntity(Entity.unit) @@ -32,12 +32,15 @@ class RequestEntitySuite extends CatsEffectSuite { val request = Http4sRequest(method = Method.GET, uri = uri"http://example.org/") - unitRequest.parse(request)(using Raise.toOption).map(opt => - opt match { - case Some(Tuple1(())) => true - case other => fail(s"Not the expected entity: $other") - } - ).assert + unitRequest + .parse(request)(using Raise.toOption) + .map(opt => + opt match { + case Some(Tuple1(())) => true + case other => fail(s"Not the expected entity: $other") + } + ) + .assert } test("Unit request unparses unit") { @@ -54,19 +57,29 @@ class RequestEntitySuite extends CatsEffectSuite { test("Text request parses string") { val request = - Http4sRequest(method = Method.GET, uri = uri"http://example.org/", entity = Http4sEntity.utf8String("hello")) + Http4sRequest( + method = Method.GET, + uri = uri"http://example.org/", + entity = Http4sEntity.utf8String("hello") + ) - textRequest.parse(request)(using Raise.toOption).map(opt => - opt match { - case Some(Tuple1("hello")) => true - case other => fail(s"Not the expected entity: $other") - } - ) + textRequest + .parse(request)(using Raise.toOption) + .map(opt => + opt match { + case Some(Tuple1("hello")) => true + case other => fail(s"Not the expected entity: $other") + } + ) } test("Text request unparses text") { val request = - Http4sRequest(method = Method.GET, uri = uri"http://example.org/", entity = Http4sEntity.utf8String("hello")) + Http4sRequest( + method = Method.GET, + uri = uri"http://example.org/", + entity = Http4sEntity.utf8String("hello") + ) val unparsed = textRequest.unparse(Tuple1("hello")) diff --git a/core/jvm/src/test/scala/krop/route/RequestHeaderSuite.scala b/core/jvm/src/test/scala/krop/route/RequestHeaderSuite.scala index 2e6d3ef..a6481d1 100644 --- a/core/jvm/src/test/scala/krop/route/RequestHeaderSuite.scala +++ b/core/jvm/src/test/scala/krop/route/RequestHeaderSuite.scala @@ -41,12 +41,14 @@ class RequestHeaderSuite extends CatsEffectSuite { val extractContentTypeWithDefaultRequest = Request.get(Path.root).extractHeader(jsonContentType) - test("Ensure header fails if header does not exist") { val request = Http4sRequest(method = Method.GET, uri = uri"http://example.org/") - ensureJsonHeaderRequest.parse(request)(using Raise.toOption).map(_.isEmpty).assert + ensureJsonHeaderRequest + .parse(request)(using Raise.toOption) + .map(_.isEmpty) + .assert } test("Ensure header succeeds if header does exist") {