diff --git a/tests/src/test/scala/cats/tests/EitherTTests.scala b/tests/src/test/scala/cats/tests/EitherTTests.scala index 9f344cc2e5d..d4df6a55106 100644 --- a/tests/src/test/scala/cats/tests/EitherTTests.scala +++ b/tests/src/test/scala/cats/tests/EitherTTests.scala @@ -119,6 +119,24 @@ class EitherTTests extends CatsSuite { } } + test("toNested") { + forAll { (eithert: EitherT[List, String, Int]) => + eithert.toNested.map(_.toEither) should === (eithert.value) + } + } + + test("toNestedValidated") { + forAll { (eithert: EitherT[List, String, Int]) => + eithert.toNestedValidated.map(_.toValidated) should === (eithert.value) + } + } + + test("toNestedValidatedNel") { + forAll { (eithert: EitherT[List, String, Int]) => + eithert.toNestedValidatedNel.map(_.toValidatedNel) should === (eithert.value) + } + } + test("withValidated") { forAll { (eithert: EitherT[List, String, Int], f: String => Char, g: Int => Double) => eithert.withValidated(_.bimap(f, g)) should === (eithert.bimap(f, g))