Skip to content

Commit

Permalink
Fix unknown enum test
Browse files Browse the repository at this point in the history
The test had no assertion
  • Loading branch information
rlazo committed Jul 3, 2024
1 parent e4b9381 commit 333fa9a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ internal class UnarySnapshotTests {
withTimeout(testTimeout) {
val response = apiController.generateContent(textGenerateContentRequest("prompt"))

response.candidates?.first {
it.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } ?: false
}
response.candidates?.isNullOrEmpty() shouldBe false
val candidate = response.candidates?.first()
candidate?.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } shouldBe true
}
}

Expand Down

0 comments on commit 333fa9a

Please sign in to comment.