Skip to content

Commit

Permalink
#691 - fix tests in JsonCodecSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-chetvertkov committed Jun 26, 2024
1 parent 9509110 commit c1be036
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ object JsonCodecSpec extends ZIOSpecDefault {
test("missing fields should be replaced by default values") {
assertDecodes(
recordSchema,
ListMap[String, Any]("foo" -> "s", "bar" -> 0),
ListMap[String, Any]("foo" -> "s", "bar" -> 1),
charSequenceToByteChunk("""{"foo":"s"}""")
)
},
Expand Down Expand Up @@ -1650,6 +1650,7 @@ object JsonCodecSpec extends ZIOSpecDefault {
.Field(
"bar",
Schema.Primitive(StandardType.IntType),
annotations0 = Chunk(fieldDefaultValue(1)),
get0 = (p: ListMap[String, _]) => p("bar").asInstanceOf[Int],
set0 = (p: ListMap[String, _], v: Int) => p.updated("bar", v)
)
Expand Down

0 comments on commit c1be036

Please sign in to comment.