Skip to content

Commit

Permalink
Merge pull request #723 from vlovgr/circe-yaml-0.15.1
Browse files Browse the repository at this point in the history
Update circe-yaml to 0.15.1
  • Loading branch information
vlovgr authored Nov 23, 2023
2 parents f941202 + 1929c97 commit cac3f40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ val catsEffectVersion = "3.5.2"

val circeVersion = "0.14.6"

val circeYamlVersion = "0.14.2"
val circeYamlVersion = "0.15.1"

val enumeratumVersion = "1.7.3"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ final class CirceYamlSpec extends CatsEffectSuite {
test("circeYamlConfigDecoder.invalid.noquotes") {
checkError(
ConfigValue.default("abc").as[Int](circeYamlConfigDecoder("Int")),
"""Unable to decode json "abc" to Int: Int"""
"""Unable to decode json "abc" to Int: DecodingFailure at : Int"""
)
}

test("circeYamlConfigDecoder.invalid") {
checkError(
ConfigValue.default("\"abc\"").as[Int](circeYamlConfigDecoder("Int")),
"""Unable to decode json "abc" to Int: Int"""
"""Unable to decode json "abc" to Int: DecodingFailure at : Int"""
)
}

Expand All @@ -61,7 +61,7 @@ final class CirceYamlSpec extends CatsEffectSuite {
test("circeYamlConfigDecoder.invalid.loaded") {
checkError(
ConfigValue.loaded(ConfigKey("key"), "\"abc\"").as[Int](circeYamlConfigDecoder("Int")),
"""Key with json "abc" cannot be decoded to Int: Int"""
"""Key with json "abc" cannot be decoded to Int: DecodingFailure at : Int"""
)
}

Expand Down Expand Up @@ -115,7 +115,13 @@ final class CirceYamlSpec extends CatsEffectSuite {
value
.attempt[IO]
.flatMap {
case Left(error) => IO(assert(error.messages === Chain.one(message)))
case Right(a) => IO(fail(s"expected error, got $a"))
case Left(error) =>
IO(
assert(
error.messages === Chain.one(message),
s"Got messages:\n\n${error.messages}\n\nExpected message:\n\n$message"
)
)
case Right(a) => IO(fail(s"expected error, got $a"))
}
}

0 comments on commit cac3f40

Please sign in to comment.