Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolysergeev committed Feb 12, 2023
1 parent 10d3577 commit f35a06b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions redis/src/test/scala/zio/redis/InputSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
)
)
},
Expand Down Expand Up @@ -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")(
Expand Down Expand Up @@ -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")(
Expand All @@ -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")))
)
},
Expand All @@ -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")))
)
},
Expand Down

0 comments on commit f35a06b

Please sign in to comment.