EventStream.publish() can now receive vararg

This commit is contained in:
2024-02-28 23:39:57 +01:00
parent 43b5f27e50
commit 8beb66d8dc
5 changed files with 13 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ import org.koin.core.context.stopKoin
import org.koin.ktor.ext.inject
import kotlin.test.assertEquals
class PutCardTest : FunSpec({
class CardTest : FunSpec({
test("/game/{id}/card") {
testApplication {
val client = httpClient()
@@ -48,6 +48,7 @@ class PutCardTest : FunSpec({
module()
val eventStream by inject<EventStream<GameId>>()
eventStream.publish(
PlayCardEvent(GameId(), Card.Simple(2, Card.Color.Yellow)),
PlayCardEvent(id, card),
)
}