fix testApplicationWithConfig

This commit is contained in:
2025-04-05 04:44:48 +02:00
parent e1529ee52c
commit fd954e631d
7 changed files with 60 additions and 56 deletions

View File

@@ -48,14 +48,13 @@ class GameStateRouteTest :
}
test("/games/{id}/card/last") {
testApplicationWithConfig { koin ->
val gameId = GameId()
val player1 = Player(name = "Nikola")
val player2 = Player(name = "Einstein")
var lastPlayedCard: Card? = null
val eventHandler = koin.get<GameEventHandler>()
val stateRepo = koin.get<GameStateRepository>()
val gameId = GameId()
val player1 = Player(name = "Nikola")
val player2 = Player(name = "Einstein")
var lastPlayedCard: Card? = null
testApplicationWithConfig({
val eventHandler = get<GameEventHandler>()
val stateRepo = get<GameStateRepository>()
runBlocking {
eventHandler.handle(gameId) { NewPlayerEvent(gameId, player1, it) }
@@ -89,7 +88,7 @@ class GameStateRouteTest :
}
delay(100)
}
}) {
httpClient()
.get("/games/$gameId/card/last") {
withAuth(player1)