Skip to content

Commit

Permalink
fix config param not found
Browse files Browse the repository at this point in the history
  • Loading branch information
onyedikachi-david committed Jun 9, 2024
1 parent 285f97d commit 5c6f328
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package zio.schema.codec

import zio.Console._
import zio._
import zio.json.{ DeriveJsonEncoder, JsonEncoder }
import zio.schema._
import zio.test.Assertion._
import zio.test.TestAspect._
import zio.test.*
import zio.test._

object DefaultValueSpec extends ZIOSpecDefault {
implicit val defaultConfig: JsonCodec.Config = JsonCodec.Config.default
Expand All @@ -19,7 +18,7 @@ object DefaultValueSpec extends ZIOSpecDefault {
private val customSuite = suite("custom")(
suite("default value schema")(
test("default value at last field") {
val result = JsonCodec.jsonDecoder(Schema[WithDefaultValue], defaultConfig).decodeJson("""{"orderId": 1}""")
val result = JsonCodec.jsonDecoder(Schema[WithDefaultValue]).decodeJson("""{"orderId": 1}""")
assertTrue(result.isRight)
}
)
Expand All @@ -30,5 +29,4 @@ object DefaultValueSpec extends ZIOSpecDefault {
object WithDefaultValue {
implicit lazy val schema: Schema[WithDefaultValue] = DeriveSchema.gen[WithDefaultValue]
}

}

0 comments on commit 5c6f328

Please sign in to comment.