From d177737fd818a91b827de450a2de4c1c978623d7 Mon Sep 17 00:00:00 2001 From: Diana Freitas <56595843+dianaamfr@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:23:26 +0000 Subject: [PATCH] Test precedence with duplicate paths at different depths Co-authored-by: Joao Azevedo --- .../test/scala/com/kevel/apso/circe/ImplicitsSpec.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala b/circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala index fd4085fe..810e2504 100644 --- a/circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala +++ b/circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala @@ -33,8 +33,11 @@ class ImplicitsSpec extends Specification { } "giving precedence to the last path value if duplicate paths exist" in { - val res = fromFullPaths(List("a" -> 1.asJson, "a" -> 2.asJson, "a" -> 3.asJson)) - res mustEqual json"""{"a": 3}""" + val json1 = fromFullPaths(List("a" -> 1.asJson, "a" -> 2.asJson, "a" -> 3.asJson)) + json1 mustEqual json"""{"a": 3}""" + + val json2 = fromFullPaths(List("a.b.c" -> 1.asJson, "a.b" -> 2.asJson, "a" -> 3.asJson)) + json2 mustEqual json"""{"a": 3}""" } }