Skip to content

Commit

Permalink
remove redundant left/right checks
Browse files Browse the repository at this point in the history
  • Loading branch information
derekmorr committed May 19, 2017
1 parent 94118f9 commit e7df57c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/test/scala/pureconfig/ConfigConvertChecks.scala
Expand Up @@ -27,7 +27,6 @@ trait ConfigConvertChecks { this: FlatSpec with Matchers with GeneratorDrivenPro
it should s"read an arbitrary ${tag.runtimeClass.getCanonicalName}" in forAll {
(t: T) =>
val result = cc.from(cc.to(t))
result shouldBe a[Right[_, _]]
result.right.value shouldEqual t
}

Expand Down Expand Up @@ -93,9 +92,8 @@ trait ConfigConvertChecks { this: FlatSpec with Matchers with GeneratorDrivenPro
it should s"fail when it tries to read a value of type ${tag.runtimeClass.getCanonicalName} " +
s"from ${value.render(ConfigRenderOptions.concise())}" in {
val result = cr.from(value)
result shouldBe a[Left[_, _]]
result.left.get.toList should have size 1
result.left.get.head shouldBe a[E]
result.left.value.toList should have size 1
result.left.value.head shouldBe a[E]
}
}
}

0 comments on commit e7df57c

Please sign in to comment.