Skip to content

Commit

Permalink
final usage of .right, add EitherValues to access nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-nowak committed Nov 13, 2024
1 parent 0a1f0ef commit 5cb7599
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thrall/test/lib/kinesis/ThrallEventConsumerTest.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package lib.kinesis

import lib.elasticsearch.ElasticSearchTestBase
import org.scalatest.EitherValues
import org.scalatestplus.mockito.MockitoSugar

class ThrallEventConsumerTest extends ElasticSearchTestBase with MockitoSugar {
class ThrallEventConsumerTest extends ElasticSearchTestBase with MockitoSugar with EitherValues {
"parse message" - {
"parse minimal message" in {
val j =
Expand All @@ -16,7 +17,7 @@ class ThrallEventConsumerTest extends ElasticSearchTestBase with MockitoSugar {
|""".stripMargin.getBytes()
val m2 = ThrallEventConsumer.parseRecord(j, java.time.Instant.EPOCH)
m2.isRight shouldEqual (true)
m2.right.get.subject shouldBe "DeleteImageMessage"
m2.value.subject shouldBe "DeleteImageMessage"
}
}
}
Expand Down

0 comments on commit 5cb7599

Please sign in to comment.