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 a49a9956..fd4085fe 100644 --- a/circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala +++ b/circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala @@ -31,6 +31,11 @@ class ImplicitsSpec extends Specification { val paths = (1 to 10000).map(i => (s"a.v$i", i.asJson)).toList fromFullPaths(paths, ".") must not(throwAn[StackOverflowError]) } + + "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}""" + } } "provide a method to get the key set of a JSON Object" in {