Skip to content

Commit b4953b8

Browse files
committed
fix test assert returning success in case of decoding error
1 parent ea3bde1 commit b4953b8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

github4s/shared/src/test/scala/github4s/utils/BaseIntegrationSpec.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ abstract class BaseIntegrationSpec
6464

6565
def testIsRight[A](response: GHResponse[A], f: A => Assertion = (_: A) => succeed): Assertion = {
6666
withClue(response.result) {
67-
response.result.toOption map (f(_)) match {
68-
case _ => succeed
67+
response.result match {
68+
case Left(error) => fail(error.getMessage())
69+
case Right(value) => f(value)
6970
}
7071
}
7172
}

0 commit comments

Comments
 (0)