Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update circe-yaml to 0.15.1 #723

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"))
}
}
Loading