Skip to content

Commit

Permalink
Merge pull request #817 from nicoulaj/fix-assert
Browse files Browse the repository at this point in the history
fix test assert returning success in case of decoding error
  • Loading branch information
juanpedromoreno authored Sep 15, 2022
2 parents b2aa183 + 30d65d7 commit 5002bf5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ abstract class BaseIntegrationSpec

def testIsRight[A](response: GHResponse[A], f: A => Assertion = (_: A) => succeed): Assertion = {
withClue(response.result) {
response.result.toOption map (f(_)) match {
case _ => succeed
response.result match {
case Left(error) => fail(error.getMessage())
case Right(value) => f(value)
}
}
}
Expand Down

0 comments on commit 5002bf5

Please sign in to comment.