diff --git a/optics/src/test/scala/io/circe/optics/JsonPathSuite.scala b/optics/src/test/scala/io/circe/optics/JsonPathSuite.scala index d9245b03..63c1b0e3 100644 --- a/optics/src/test/scala/io/circe/optics/JsonPathSuite.scala +++ b/optics/src/test/scala/io/circe/optics/JsonPathSuite.scala @@ -71,9 +71,8 @@ class JsonPathSuite extends CirceSuite { assert(root.at("foo").replace(Some(true.asJson))(john).asObject.flatMap(_.apply("foo")) === Some(Json.True)) } - it should "support codec" in { + it should "support codec" in assert(root.cars.index(0).as[Car].getOption(john) === Some(Car("fancy", 120, automatic = false))) - } "JsonTraversalPath" should "support traversal over each values of a json object" in { assert(root.each.string.getAll(john) === List("John", "Doe")) @@ -97,7 +96,7 @@ class JsonPathSuite extends CirceSuite { ) } - it should "support an unsafe filtering by value" in { + it should "support an unsafe filtering by value" in assert( root.cars.each.filterUnsafe(root.maxSpeed.int.exist(_ > 100)).model.string.replace("new")(john) === Json.obj( @@ -114,6 +113,5 @@ class JsonPathSuite extends CirceSuite { ).asJson ) ) - } } diff --git a/optics/src/test/scala/io/circe/optics/LawsTests.scala b/optics/src/test/scala/io/circe/optics/LawsTests.scala index c768ba1a..b7a684a5 100644 --- a/optics/src/test/scala/io/circe/optics/LawsTests.scala +++ b/optics/src/test/scala/io/circe/optics/LawsTests.scala @@ -96,9 +96,8 @@ object LawsTests extends Laws { "modify id = id" -> Prop.forAll((s: S, i: I) => laws(i).modifyIdentity(s)), "compose modify" -> Prop.forAll((s: S, g: A => A, h: A => A, i: I) => laws(i).composeModify(s, g, h)), "consistent set with modify" -> Prop.forAll((s: S, a: A, i: I) => laws(i).consistentReplaceModify(s, a)), - "consistent modify with modifyId" -> Prop.forAll((s: S, g: A => A, i: I) => - laws(i).consistentModifyModifyId(s, g) - ), + "consistent modify with modifyId" -> Prop + .forAll((s: S, g: A => A, i: I) => laws(i).consistentModifyModifyId(s, g)), "consistent getOption with modifyId" -> Prop.forAll((s: S, i: I) => laws(i).consistentGetOptionModifyId(s)) ) }