From f35a06b4b3bd3756e69f1e62cbea740e9c071933 Mon Sep 17 00:00:00 2001 From: Anatoly Sergeev Date: Sun, 12 Feb 2023 21:30:45 +0300 Subject: [PATCH] fix linter #673 --- .../src/test/scala/zio/redis/InputSpec.scala | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/redis/src/test/scala/zio/redis/InputSpec.scala b/redis/src/test/scala/zio/redis/InputSpec.scala index e2f86d2bd..f4aac8361 100644 --- a/redis/src/test/scala/zio/redis/InputSpec.scala +++ b/redis/src/test/scala/zio/redis/InputSpec.scala @@ -285,7 +285,8 @@ object InputSpec extends BaseSpec { } yield assert(result)( equalTo( RespCommand(Literal("ON"), Literal("REDIRECT"), Unknown(clientId.toString)) ++ prefixes - .map(p => RespCommand(Literal("PREFIX"), Unknown(p))).fold(RespCommand.empty)(_ ++ _) ++ RespCommand(Literal("NOLOOP")) + .map(p => RespCommand(Literal("PREFIX"), Unknown(p))) + .fold(RespCommand.empty)(_ ++ _) ++ RespCommand(Literal("NOLOOP")) ) ) }, @@ -1164,7 +1165,11 @@ object InputSpec extends BaseSpec { XGroupCommand.Create("key", "group", "id", mkStream = true) ) ) - .map(assert(_)(equalTo(RespCommand(Literal("CREATE"), Key("key"), Key("group"), Key("id"), Literal("MKSTREAM"))))) + .map( + assert(_)( + equalTo(RespCommand(Literal("CREATE"), Key("key"), Key("group"), Key("id"), Literal("MKSTREAM"))) + ) + ) } ), suite("XGroupSetId")( @@ -1273,7 +1278,9 @@ object InputSpec extends BaseSpec { ), suite("ListMaxLen")( test("valid value") { - ZIO.attempt(ListMaxLenInput.encode(ListMaxLen(10L))).map(assert(_)(equalTo(RespCommand(Literal("MAXLEN"), Unknown("10"))))) + ZIO + .attempt(ListMaxLenInput.encode(ListMaxLen(10L))) + .map(assert(_)(equalTo(RespCommand(Literal("MAXLEN"), Unknown("10"))))) } ), suite("Rank")( @@ -1288,7 +1295,9 @@ object InputSpec extends BaseSpec { ZIO.attempt(GetExInput[String]().encode(scala.Tuple3.apply("key", Expire.SetExpireSeconds, 1.second))) resultMilliseconds <- ZIO.attempt(GetExInput[String]().encode(scala.Tuple3("key", Expire.SetExpireMilliseconds, 100.millis))) - } yield assert(resultSeconds)(equalTo(RespCommand(Key("key"), Literal("EX"), Unknown("1")))) && assert(resultMilliseconds)( + } yield assert(resultSeconds)(equalTo(RespCommand(Key("key"), Literal("EX"), Unknown("1")))) && assert( + resultMilliseconds + )( equalTo(RespCommand(Key("key"), Literal("PX"), Unknown("100"))) ) }, @@ -1306,7 +1315,9 @@ object InputSpec extends BaseSpec { scala.Tuple3("key", ExpiredAt.SetExpireAtMilliseconds, Instant.parse("2021-04-06T00:00:00Z")) ) ) - } yield assert(resultSeconds)(equalTo(RespCommand(Key("key"), Literal("EXAT"), Unknown("1617667200")))) && assert(resultMilliseconds)( + } yield assert(resultSeconds)( + equalTo(RespCommand(Key("key"), Literal("EXAT"), Unknown("1617667200"))) + ) && assert(resultMilliseconds)( equalTo(RespCommand(Key("key"), Literal("PXAT"), Unknown("1617667200000"))) ) },